diff --git a/.github/workflows/labs.yaml b/.github/workflows/labs.yaml deleted file mode 100644 index e59b613..0000000 --- a/.github/workflows/labs.yaml +++ /dev/null @@ -1,69 +0,0 @@ -name: "Build and deploy aap-innsyn to labs" -on: - workflow_dispatch: - push: - branches: - - "main" - paths-ignore: - - '**.md' -env: - "IMAGE": "ghcr.io/${{ github.repository }}:${{ github.sha }}-labs" -jobs: - "build": - name: "build" - runs-on: "ubuntu-latest" - steps: - - uses: "actions/checkout@v3" - - uses: "actions/setup-node@v3" - with: - node-version: "18" - registry-url: "https://npm.pkg.github.com" - cache: "yarn" - - name: "Cache client node_modules" - id: "cache-node-modules" - uses: "actions/cache@v3" - with: - path: "node_modules" - key: "${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}" - - name: "install dependencies Yarn" - if: "steps.cache-node-modules.outputs.cache-hit != 'true'" - run: "yarn install --frozen-lockfile" - env: - NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }} - - name: Copy env-file for labs - run: cp .nais/labs.env .env.local - - name: "client tests" - run: "yarn test" - - name: "Bygg klient(yarn run build)" - run: "yarn run build" - - name: "Set up Docker Buildx" - id: "buildx" - uses: "docker/setup-buildx-action@v2" - - name: "Login to GitHub Docker Registry" - uses: "docker/login-action@v2" - with: - "registry": "ghcr.io" - "username": "${{ github.actor }}" - "password": "${{ secrets.GITHUB_TOKEN }}" - - name: "Build and push Docker" - uses: "docker/build-push-action@v4" - with: - context: . - file: Dockerfile - tags: "${{ env.IMAGE }}" - push: "true" - cache-from: "type=gha" - cache-to: "type=gha,mode=max" - "deployAppToLabs": - name: "Deploy app to labs" - needs: "build" - runs-on: "ubuntu-latest" - steps: - - uses: "actions/checkout@v3" - - name: "Deploy to LABS" - uses: "nais/deploy/actions/deploy@v1" - env: - "APIKEY": "${{ secrets.NAIS_DEPLOY_APIKEY }}" - "CLUSTER": "dev-gcp" - "RESOURCE": ".nais/nais-mock.yaml" - "VARS": ".nais/labs.yaml" diff --git a/.nais/labs.env b/.nais/labs.env deleted file mode 100644 index c95d37b..0000000 --- a/.nais/labs.env +++ /dev/null @@ -1,4 +0,0 @@ -DECORATOR_ENV="dev" -NEXT_PUBLIC_ENVIRONMENT="labs" - -NEXT_PUBLIC_FARO_URL="https://telemetry.ekstern.dev.nav.no/collect" \ No newline at end of file diff --git a/.nais/labs.yaml b/.nais/labs.yaml deleted file mode 100644 index 9a14639..0000000 --- a/.nais/labs.yaml +++ /dev/null @@ -1,7 +0,0 @@ -ingresses: -- "https://aap-mine-aap.ekstern.dev.nav.no/" -env: -- name: APP_URL - value: "https://aap-mine-aap.ekstern.dev.nav.no/" -externals: - - "dekoratoren.ekstern.dev.nav.no" \ No newline at end of file diff --git a/lib/utils/__test__/environments.test.ts b/lib/utils/__test__/environments.test.ts index bbcfb57..f5c567c 100644 --- a/lib/utils/__test__/environments.test.ts +++ b/lib/utils/__test__/environments.test.ts @@ -5,10 +5,6 @@ describe('Environments', () => { process.env.NEXT_PUBLIC_ENVIRONMENT = 'localhost'; expect(isMock()).toBe(true); }); - it('isMock should be true for labs', () => { - process.env.NEXT_PUBLIC_ENVIRONMENT = 'labs'; - expect(isMock()).toBe(true); - }); it('isMock should be false for dev', () => { process.env.NEXT_PUBLIC_ENVIRONMENT = 'dev'; expect(isMock()).toBe(false); diff --git a/lib/utils/environments.ts b/lib/utils/environments.ts index e2c3a67..a6c10a6 100644 --- a/lib/utils/environments.ts +++ b/lib/utils/environments.ts @@ -1,3 +1,3 @@ -const MOCK_ENVIRONMENTS = ['localhost', 'labs']; +const MOCK_ENVIRONMENTS = ['localhost']; export const isMock = () => MOCK_ENVIRONMENTS.includes(process.env.NEXT_PUBLIC_ENVIRONMENT ?? '');