generated from navikt/bidrag-vedtak
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (45 loc) · 1.96 KB
/
deploy_q1.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
46
47
48
49
name: Deploy q1
on:
workflow_dispatch:
push:
branches:
- 'q1/**'
- 'Q1/**'
jobs:
build_and_deploy:
name: "Build and deploy to q1"
permissions:
contents: "read"
id-token: "write"
uses: navikt/bidrag-workflow/.github/workflows/deploy.yaml@main
secrets: inherit
with:
nais_variabler_filnavn: q1.yaml
run_cucumber_tests:
runs-on: ubuntu-latest
name: Run cucumber tests
needs: build_and_deploy
if: ${{ always() && needs.build_and_deploy.outputs.deploy_suksess == 'true' }}
env:
INGRESS_CUCUMBER: https://bidrag-cucumber-cloud.ekstern.dev.nav.no
INGRESS_STONAD: https://bidrag-stonad-q1.intern.dev.nav.no
INGRESS_VEDTAK: https://bidrag-vedtak-q1.intern.dev.nav.no
steps:
- run: |
curl -H "Content-Type: application/json" -i \
-H "Authorization: Basic ${{ secrets.BIDRAG_CUCUMBER_CLOUD_AUTH }}" \
--request POST \
--data '{"tags":["@bidrag-stonad-vedtak"],"noContextPathForApps":["bidrag-vedtak"],"ingressesForApps":[
"${{ env.INGRESS_VEDTAK }}@bidrag-vedtak"
]}' \
${{ env.INGRESS_CUCUMBER }}/bidrag-cucumber-cloud/run | tee .cucumber-result
cat .cucumber-result | grep HTTP/2 | grep -c 200 > /dev/null # fails if count is 0 (http status is not ok, aka http status code is not 200)
- run: |
curl -H "Content-Type: application/json" -i \
-H "Authorization: Basic ${{ secrets.BIDRAG_CUCUMBER_CLOUD_AUTH }}" \
--request POST \
--data '{"noContextPathForApps":["bidrag-stonad"],"ingressesForApps":[
"${{ env.INGRESS_STONAD }}@tag:bidrag-stonad"
]}' \
${{ env.INGRESS_CUCUMBER }}/bidrag-cucumber-cloud/run | tee .cucumber-result
cat .cucumber-result | grep HTTP/2 | grep -c 200 > /dev/null # fails if count is 0 (http status is not ok, aka http status code is not 200)