-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (41 loc) · 1.41 KB
/
deploy-prod&demo.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Deploy to production & demo
on:
push:
branches:
- main
jobs:
build-organization-catalog:
name: Build when pull request is created
uses: Informasjonsforvaltning/workflows/.github/workflows/build-push.yaml@main
with:
app_name: organization-catalog
java_version: '21'
coverage_file_path: ./target/site/jacoco/jacoco.xml
environment: prod
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
deploy-prod:
name: Deploy to prod environment
needs: [ build-organization-catalog ]
uses: Informasjonsforvaltning/workflows/.github/workflows/kustomize-deploy.yaml@main
with:
app_name: organization-catalog
environment: prod
cluster: digdir-fdk-prod
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DIGDIR_FDK_AUTODEPLOY: ${{ secrets.DIGDIR_FDK_PROD_AUTODEPLOY }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
deploy-to-demo:
name: Deploy to demo if prod-deploy is successful
needs: [ deploy-prod ]
uses: Informasjonsforvaltning/workflows/.github/workflows/kustomize-deploy.yaml@main
with:
app_name: organization-catalog
environment: demo
cluster: digdir-fdk-dev
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DIGDIR_FDK_AUTODEPLOY: ${{ secrets.DIGDIR_FDK_DEV_AUTODEPLOY }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}