Skip to content

Commit a06458d

Browse files
authored
Merge pull request #78 from navikt/dev
[PROD][KAIZEN-0] migrate to Google Artifact Registry
2 parents 083a26a + 3bf4824 commit a06458d

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

.github/workflows/main.yml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name: Build, push, and deploy
33
on: [push]
44

55
env:
6-
IMAGE: ghcr.io/${{ github.repository }}/modia-robot-api:${{ github.sha }}
76
CI: true
87
TZ: Europe/Oslo
98
jobs:
@@ -35,6 +34,10 @@ jobs:
3534
runs-on: ubuntu-latest
3635
permissions:
3736
packages: write
37+
contents: read
38+
id-token: write
39+
outputs:
40+
image: ${{ steps.docker-build-push.outputs.image }}
3841
steps:
3942
- uses: actions/checkout@v3
4043
- name: Set up JDK 17
@@ -47,25 +50,27 @@ jobs:
4750
- name: Build
4851
run: ./gradlew build
4952
- name: Publish Docker image
50-
env:
51-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52-
run: |
53-
docker build --tag ${IMAGE} .
54-
docker login ghcr.io -u ${GITHUB_REPOSITORY} -p ${GITHUB_TOKEN}
55-
docker push ${IMAGE}
53+
uses: nais/docker-build-push@v0
54+
id: docker-build-push
55+
with:
56+
team: personoversikt
57+
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
58+
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
59+
5660
deploy-qa:
5761
name: Deploy to preprod
5862
needs: build-and-push
5963
if: github.ref == 'refs/heads/dev'
6064
runs-on: ubuntu-latest
6165
steps:
6266
- uses: actions/checkout@v3
63-
- uses: nais/deploy/actions/deploy@v1
67+
- uses: nais/deploy/actions/deploy@v2
6468
env:
6569
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
6670
PRINT_PAYLOAD: true
6771
CLUSTER: dev-fss
6872
RESOURCE: .nais/preprod.yml
73+
VAR: image=${{ needs.build-and-push.outputs.image }}
6974

7075
deploy-prod:
7176
name: Deploy to prod
@@ -74,9 +79,10 @@ jobs:
7479
runs-on: ubuntu-latest
7580
steps:
7681
- uses: actions/checkout@v3
77-
- uses: nais/deploy/actions/deploy@v1
82+
- uses: nais/deploy/actions/deploy@v2
7883
env:
7984
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
8085
PRINT_PAYLOAD: true
8186
CLUSTER: prod-fss
8287
RESOURCE: .nais/prod.yml
88+
VAR: image=${{ needs.build-and-push.outputs.image }}

.nais/preprod.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ spec:
1212
accessPolicy:
1313
inbound:
1414
rules:
15-
- application: modiapersonoversikt-api-q1
15+
- application: rpa-medlemskap-og-avgift
16+
namespace: team-rpa
17+
cluster: dev-fss
1618
liveness:
1719
path: /internal/isAlive
1820
initialDelay: 20
@@ -62,7 +64,7 @@ spec:
6264
mountPath: /var/run/secrets/nais.io/vault
6365
env:
6466
- name: IDENT_ALLOW_LIST
65-
value: "R154727,R156418,R158345,R158346,R160569,R165950,R165951,R165952,R150818,R150819,R155645,R162552,Z994123,Z990351,Z992779,Z990949,Z990467,Z991629,Z990237,Z994673"
67+
value: "R154727,R156418,R158345,R158346,R160569,R165950,R165951,R165952,R150818,R150819,R155645,R162552,Z994123,Z990351,Z992779,Z990949,Z990467,Z991629,Z990237,Z994673,Z994818"
6668
- name: SECURITYTOKENSERVICE_URL
6769
value: "https://sts-q1.preprod.local/SecurityTokenServiceProvider/"
6870
- name: OPPFOLGING_URL

0 commit comments

Comments
 (0)