Skip to content

Commit

Permalink
Use keyless deploy v2
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbb committed Jul 17, 2024
1 parent 2f2dc86 commit eaf0d0f
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 26 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/build-and-deploy-fake-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,9 @@ jobs:
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}

- uses: nais/deploy/actions/deploy@v1
- uses: nais/deploy/actions/deploy@v2
env:
IMAGE: ${{ steps.docker-push.outputs.image }}
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
VAR: image=${{ steps.docker-push.outputs.image }}
CLUSTER: dev-gcp
RESOURCE: fake-produsent-api/nais-application.yaml
PRINT_PAYLOAD: true
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/build-and-deploy-test-produsent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,9 @@ jobs:
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}

- uses: nais/deploy/actions/deploy@v1
- uses: nais/deploy/actions/deploy@v2
env:
IMAGE: ${{ steps.docker-push.outputs.image }}
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: dev-gcp
RESOURCE: test-produsent/nais-application.yaml
PRINT_PAYLOAD: true
VAR: commit=${{ github.sha }}
VAR: commit=${{ github.sha }},image=${{ steps.docker-push.outputs.image }}
5 changes: 2 additions & 3 deletions .github/workflows/cicd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,9 @@ jobs:
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
team: fager

- uses: nais/deploy/actions/deploy@v1
- uses: nais/deploy/actions/deploy@v2
name: "${{ matrix.cluster }}: deploy ${{ matrix.app }}"
env:
IMAGE: ${{ steps.login.outputs.registry }}/arbeidsgiver-notifikasjon-produsent-api:${{ github.sha }}
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
VAR: image=${{ steps.login.outputs.registry }}/arbeidsgiver-notifikasjon-produsent-api:${{ github.sha }}
CLUSTER: ${{ matrix.cluster }}
RESOURCE: config/${{ matrix.cluster }}-${{ matrix.app }}.yaml
7 changes: 3 additions & 4 deletions .github/workflows/deploy-dev-manual.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,10 @@ jobs:
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
team: fager
- uses: nais/deploy/actions/deploy@v1
- uses: nais/deploy/actions/deploy@v2
name: "${{ matrix.cluster }}: deploy ${{ matrix.app }}"
env:
IMAGE: ${{ steps.login.outputs.registry }}/arbeidsgiver-notifikasjon-produsent-api:${{ github.sha }}
VAR: image=${{ steps.login.outputs.registry }}/arbeidsgiver-notifikasjon-produsent-api:${{ github.sha }}
REF: ${{ github.sha }}
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: ${{ matrix.cluster }}
RESOURCE: config/${{ matrix.cluster }}-${{ matrix.app }}.yaml
RESOURCE: config/${{ matrix.cluster }}-${{ matrix.app }}.yaml
12 changes: 4 additions & 8 deletions .github/workflows/deploy-kafka-topic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,31 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: nais/deploy/actions/deploy@v1
- uses: nais/deploy/actions/deploy@v2
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: dev-gcp
RESOURCE: config/nais-kafka-topic.yaml
PRINT_PAYLOAD: true
VAR: pool=nav-dev

- uses: nais/deploy/actions/deploy@v1
- uses: nais/deploy/actions/deploy@v2
if: github.ref == 'refs/heads/main'
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: prod-gcp
RESOURCE: config/nais-kafka-topic.yaml
PRINT_PAYLOAD: true
VAR: pool=nav-prod

- uses: nais/deploy/actions/deploy@v1
- uses: nais/deploy/actions/deploy@v2
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: dev-gcp
RESOURCE: config/nais-kafka-topic-ekstern-varsling-status.yaml
PRINT_PAYLOAD: true
VAR: pool=nav-dev

- uses: nais/deploy/actions/deploy@v1
- uses: nais/deploy/actions/deploy@v2
if: github.ref == 'refs/heads/main'
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: prod-gcp
RESOURCE: config/nais-kafka-topic-ekstern-varsling-status.yaml
PRINT_PAYLOAD: true
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/deploy-replay-validator-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ jobs:
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
team: fager
- uses: nais/deploy/actions/deploy@v1
- uses: nais/deploy/actions/deploy@v2
name: "prod-gcp: deploy replay-validator"
env:
IMAGE: ${{ steps.login.outputs.registry }}/arbeidsgiver-notifikasjon-produsent-api:${{ github.sha }}
VAR: image=${{ steps.login.outputs.registry }}/arbeidsgiver-notifikasjon-produsent-api:${{ github.sha }}
REF: ${{ github.sha }}
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: prod-gcp
RESOURCE: config/prod-gcp-replay-validator.yaml
RESOURCE: config/prod-gcp-replay-validator.yaml

0 comments on commit eaf0d0f

Please sign in to comment.