11name : Deploy alerts
2- run-name : Deploy alerts for dapla-statbank-authenticator to test and prod
2+ run-name : Deploy alerts for Dapla Statbank Authenticator to test and prod
33
44on :
55 push :
66 branches :
77 - master
88 paths :
99 - ' .nais/alerts.yaml'
10- - ' .github/workflows/alert-deploy.yml'
10+ - ' .github/workflows/alert-deploy.yaml'
11+ workflow_dispatch :
1112permissions :
1213 id-token : write
14+ env :
15+ TEAM : dapla-stat
1316
1417jobs :
1518 test-deploy :
@@ -18,22 +21,44 @@ jobs:
1821 steps :
1922 - name : Checkout code
2023 uses : actions/checkout@v4
24+
25+ - uses : actions/checkout@v4
26+ name : Retrieve AlertManager configuration
27+ with :
28+ repository : " statisticsnorway/nais-alert-config"
29+ path : " ext_alertconfig"
30+ sparse-checkout : |
31+ alertconfig.yaml
32+ sparse-checkout-cone-mode : false
33+
2134 - name : Deploy to test
2235 uses : nais/deploy/actions/deploy@v2
2336 env :
2437 CLUSTER : test
25- RESOURCE : .nais/alerts.yaml
38+ RESOURCE : .nais/alerts.yaml,ext_alertconfig/alertconfig.yaml
2639 DEPLOY_SERVER : deploy.ssb.cloud.nais.io:443
27-
40+ VAR : cluster=test,team=${{ env.TEAM }}
41+
2842 prod-deploy :
2943 name : Deploy alerts to prod
3044 runs-on : ubuntu-latest
3145 steps :
3246 - name : Checkout code
3347 uses : actions/checkout@v4
48+
49+ - uses : actions/checkout@v4
50+ name : Retrieve AlertManager configuration
51+ with :
52+ repository : " statisticsnorway/nais-alert-config"
53+ path : " ext_alertconfig"
54+ sparse-checkout : |
55+ alertconfig.yaml
56+ sparse-checkout-cone-mode : false
57+
3458 - name : Deploy to prod
3559 uses : nais/deploy/actions/deploy@v2
3660 env :
3761 CLUSTER : prod
38- RESOURCE : .nais/alerts.yaml
39- DEPLOY_SERVER : deploy.ssb.cloud.nais.io:443
62+ RESOURCE : .nais/alerts.yaml,ext_alertconfig/alertconfig.yaml
63+ DEPLOY_SERVER : deploy.ssb.cloud.nais.io:443
64+ VAR : cluster=prod,team=${{ env.TEAM }}
0 commit comments