-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Egen dockerfil og build/deploy workflow
- Loading branch information
Showing
8 changed files
with
77 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
VITE_MOCK_ENABLED=false | ||
VITE_USE_HASH_ROUTER=false | ||
VITE_HODE_URL=/internarbeidsflatedecorator | ||
VITE_HODE_URL_V2=https://cdn.nav.no/personoversikt/internarbeidsflate-decorator-v3/dev | ||
SKIP_PREFLIGHT_CHECK=true | ||
VITE_AMPLITUDE_API_KEY=4b7349a378cfc18faf21e1fe6bea0cf2 | ||
VITE_AMPLITUDE_API_KEY_DEV=716ce898b7143ffd7ff3e52dfe69bae7 | ||
|
||
VITE_DRAFT_URL=modiapersonoversikt-draft.intern.dev.nav.no/modiapersonoversikt-draft |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Build & deploy to GCP | ||
|
||
on: [push] | ||
|
||
env: | ||
CI: true | ||
TZ: Europe/Oslo | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
contents: read | ||
id-token: write | ||
outputs: | ||
image: ${{ steps.docker-build-push.outputs.image }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '18' | ||
cache: 'npm' | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Test | ||
run: npm run test | ||
- name: Build | ||
run: npm run build:gcp | ||
- name: Publish Docker image | ||
if: github.ref == 'refs/heads/dev' # || github.ref == 'refs/heads/master' | ||
uses: nais/docker-build-push@v0 | ||
id: docker-build-push | ||
with: | ||
dockerfile: Dockerfile.gcp | ||
team: personoversikt | ||
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }} | ||
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }} | ||
|
||
deploy-dev: | ||
name: Deploy to dev-gcp | ||
needs: build | ||
if: github.ref == 'refs/heads/dev' | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: nais/deploy/actions/deploy@v2 | ||
env: | ||
PRINT_PAYLOAD: true | ||
CLUSTER: dev-gcp | ||
RESOURCE: .nais/dev.yaml | ||
VAR: version=${{ github.sha }},image=${{ needs.build.outputs.image }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM europe-north1-docker.pkg.dev/nais-management-233d/personoversikt/modia-frontend:0.10-node | ||
ADD proxy-config-q2.json proxy-config.json | ||
COPY build ./static | ||
ENV STATIC_FILES_DIR=./static | ||
FROM europe-north1-docker.pkg.dev/nais-management-233d/personoversikt/modialogin:2024.01.04-09.48-46cd9d7 | ||
ADD proxy-config.json /proxy-config.json | ||
ADD preprod-proxy-config.json /preprod-proxy-config.json | ||
COPY build /www |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM europe-north1-docker.pkg.dev/nais-management-233d/personoversikt/modia-frontend:0.10-node | ||
ADD proxy-config-q2.json proxy-config.json | ||
COPY build ./static | ||
|
||
ENV STATIC_FILES_DIR=./static | ||
ENV BASE_PATH=/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters