Skip to content

Commit

Permalink
🔀 stor merge med main
Browse files Browse the repository at this point in the history
  • Loading branch information
tidnav committed May 16, 2024
2 parents f7ab157 + 3b31788 commit 4925f6a
Show file tree
Hide file tree
Showing 72 changed files with 9,825 additions and 7,902 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/build-and-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Bygg og deploy AAP Søknad
on:
workflow_dispatch:
push:
branches:
- main
paths-ignore:
- '**.md'
jobs:
buildDev:
uses: navikt/aap-workflows/.github/workflows/frontend-next-build.yml@main
permissions:
contents: read
id-token: write
packages: write
secrets: inherit
with:
cluster: dev-gcp
appname: 'aap-soknad'
playwright: false
cdn: true
buildProd:
uses: navikt/aap-workflows/.github/workflows/frontend-next-build.yml@main
permissions:
contents: read
id-token: write
packages: write
secrets: inherit
if: github.ref == 'refs/heads/main'
with:
cluster: prod-gcp
appname: 'aap-soknad'
playwright: true
cdn: true
deployDev:
needs: buildDev
uses: navikt/aap-workflows/.github/workflows/deploy.yml@main
permissions:
contents: read
id-token: write
secrets: inherit
with:
cluster: dev-gcp
manifest: .nais/nais.yaml
imageSuffix: -dev-gcp
vars: .nais/dev.yaml
deployProd:
needs: buildProd
uses: navikt/aap-workflows/.github/workflows/deploy.yml@main
permissions:
contents: read
id-token: write
if: github.ref == 'refs/heads/main'
secrets: inherit
with:
cluster: prod-gcp
manifest: .nais/nais.yaml,.nais/prod-alerts.yaml
imageSuffix: -prod-gcp
vars: .nais/prod.yaml
deployAlertsProd:
name: Deploy alerts to prod
needs: buildProd
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- name: Deploy alerts
uses: nais/deploy/actions/deploy@v1
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: prod-gcp
RESOURCE: .nais/prod-alerts.yaml
64 changes: 64 additions & 0 deletions .github/workflows/build-dev-mock-historisk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: "Labs: historisk snapshot"
on:
workflow_dispatch:
push:
branches:
- "labs-historisk-**"
env:
"IMAGE": "ghcr.io/${{ github.repository }}-labs-historisk:${{ github.sha }}"
jobs:
buildMock:
name: build
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
env:
NPM_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
SKIP_YARN_COREPACK_CHECK: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://npm.pkg.github.com
cache: yarn
- name: Enable Corepack
run: corepack enable
- name: Cache client node_modules
id: cache-node-modules
uses: actions/cache@v4
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 --immutable
- name: Copy env-file # TODO: Se om vi kan finne en bedre løsning her på sikt
run: cp .nais/dev-mock.env .env
- name: run build
run: yarn run build
- uses: nais/docker-build-push@v0
with:
team: aap
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
image_suffix: -dev-gcp-mock-historisk
tag: ${{ github.sha }}
"deployAppToLabsHistorisk":
name: "Deploy branch to dev"
needs: "buildMock"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
- uses: gacts/github-slug@v1
id: slug
with:
to-slug: aap-soknad-${{ github.ref_name }}
- name: "Deploy historisk søknad til dev"
uses: "nais/deploy/actions/deploy@v1"
env:
"APIKEY": "${{ secrets.NAIS_DEPLOY_APIKEY }}"
"CLUSTER": "dev-gcp"
"RESOURCE": ".nais/historisk-dev-mock.yaml"
"VAR": image=${{ env.IMAGE }},ingress=https://${{ steps.slug.outputs.slug }}.ekstern.dev.nav.no,appname=${{ steps.slug.outputs.slug }},replicas=1,branchState=alive
60 changes: 60 additions & 0 deletions .github/workflows/build-dev-mock.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Build and deploy mocket versjon av aap-soknad
on:
workflow_dispatch:
push:
branches:
- main
paths-ignore:
- '**.md'
env:
IMAGE_SUFFIX: dev-gcp-mock
jobs:
buildMock:
name: build
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
env:
NPM_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
SKIP_YARN_COREPACK_CHECK: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://npm.pkg.github.com
cache: yarn
- name: Enable Corepack
run: corepack enable
- name: Cache client node_modules
id: cache-node-modules
uses: actions/cache@v4
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 --immutable
- name: Copy env-file # TODO: Se om vi kan finne en bedre løsning her på sikt
run: cp .nais/dev-mock.env .env
- name: run build
run: yarn run build
- uses: nais/docker-build-push@v0
with:
team: aap
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
image_suffix: dev-gcp-mock
tag: ${{ github.sha }}
deployMock:
needs: buildMock
uses: navikt/aap-workflows/.github/workflows/deploy.yml@main
permissions:
contents: read
id-token: write
secrets: inherit
with:
cluster: dev-gcp
manifest: .nais/dev-mock.yaml
imageSuffix: -dev-gcp-mock
64 changes: 0 additions & 64 deletions .github/workflows/build-labs-historisk.yaml

This file was deleted.

96 changes: 0 additions & 96 deletions .github/workflows/build-labs-mock.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ jobs:
name: Delete branch labs-gcp
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Scale down labs-gcp
- uses: actions/checkout@v4
- name: Scale down dev-gcp-mock-historisk
uses: nais/deploy/actions/deploy@v1
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: dev-gcp
RESOURCE: ".nais/historisk-labs.yaml"
RESOURCE: ".nais/historisk-dev-mock.yaml"
VAR: image=${{ env.IMAGE }},appname=${{env.APP_NAME}},ingress=https://${{env.APP_NAME}}.ekstern.dev.nav.no,replicas=0,branchState=deleted
Loading

0 comments on commit 4925f6a

Please sign in to comment.