Skip to content

nightly run of cucumber tests #836

nightly run of cucumber tests

nightly run of cucumber tests #836

Workflow file for this run

name: nightly run of cucumber tests
on:
schedule:
- cron: '30 2 * * *'
push:
branches:
- feature/cron-fix
env:
INGRESS_CUCUMBER: https://bidrag-cucumber-cloud.ekstern.dev.nav.no
jobs:
run-tests-for-cucumber-cloud:
runs-on: ubuntu-latest
name: "bidrag-cucumber-cloud"
steps:
- run: |
curl -H "Content-Type: application/json" -i \
-H "Authorization: Basic ${{ secrets.BIDRAG_CUCUMBER_CLOUD_AUTH }}" \
--request POST \
--data '{"ingressesForApps":[
"${{ env.INGRESS_CUCUMBER }}@tag:bidrag-cucumber-cloud"
], "skipAuth": true}' \
${{ 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 -X POST --data-urlencode "payload={\"channel\": \"#team-bidrag-dev\", \"username\": \"webhookbot\", \"text\": \"$MELDING\", \"icon_emoji\": \":boom:\"}" $WEBHOOK_URL
if: ${{ failure() }}
env:
MELDING: "<https://github.com/navikt/bidrag-cucumber-cloud/actions|Cucumber tests> for tag @bidrag-cucumber-cloud feilet"
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}
run-tests-for-bidrag-stonad:
runs-on: ubuntu-latest
name: "bidrag-stonad"
env:
INGRESS_STONAD: https://bidrag-stonad.intern.dev.nav.no
INGRESS_VEDTAK: https://bidrag-vedtak.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)
- run: |
curl -X POST --data-urlencode "payload={\"channel\": \"#team-bidrag-dev\", \"username\": \"webhookbot\", \"text\": \"$MELDING\", \"icon_emoji\": \":boom:\"}" $WEBHOOK_URL
if: ${{ failure() }}
env:
MELDING: "<https://github.com/navikt/bidrag-cucumber-cloud/actions|Cucumber tests> for tab @bidrag-stonad feilet"
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}
run-tests-for-bidrag-vedtak:
runs-on: ubuntu-latest
name: "bidrag-vedtak"
env:
INGRESS_VEDTAK: https://bidrag-vedtak.intern.dev.nav.no
steps:
- run: |
curl -H "Content-Type: application/json" -i \
-H "Authorization: Basic ${{ secrets.BIDRAG_CUCUMBER_CLOUD_AUTH }}" \
--request POST \
--data '{"noContextPathForApps":["bidrag-vedtak"],"ingressesForApps":[
"${{ env.INGRESS_VEDTAK }}@tag: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 -X POST --data-urlencode "payload={\"channel\": \"#team-bidrag-dev\", \"username\": \"webhookbot\", \"text\": \"$MELDING\", \"icon_emoji\": \":boom:\"}" $WEBHOOK_URL
if: ${{ failure() }}
env:
MELDING: "<https://github.com/navikt/bidrag-cucumber-cloud/actions|Cucumber tests> for tag @bidrag-vedtak feilet"
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}
run-tests-for-bidrag-grunnlag:
runs-on: ubuntu-latest
name: "bidrag-grunnlag"
env:
INGRESS_GRUNNLAG: https://bidrag-grunnlag.intern.dev.nav.no
steps:
- run: |
curl -H "Content-Type: application/json" -i \
-H "Authorization: Basic ${{ secrets.BIDRAG_CUCUMBER_CLOUD_AUTH }}" \
--request POST \
--data '{"noContextPathForApps":["bidrag-grunnlag"],"ingressesForApps":[
"${{ env.INGRESS_GRUNNLAG }}@tag:bidrag-grunnlag"
]}' \
${{ 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 -X POST --data-urlencode "payload={\"channel\": \"#team-bidrag-dev\", \"username\": \"webhookbot\", \"text\": \"$MELDING\", \"icon_emoji\": \":boom:\"}" $WEBHOOK_URL
if: ${{ failure() }}
env:
MELDING: "<https://github.com/navikt/bidrag-cucumber-cloud/actions|Cucumber tests> for tag @bidrag-grunnlag feilet"
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}
run-tests-for-arbeidsflyt-endre-fagomrade:
runs-on: ubuntu-latest
name: "arbeidsflyt-endre-fagomrade"
env:
INGRESS_OPPGAVE: https://oppgave.dev-fss-pub.nais.io
steps:
- run: |
curl -H "Content-Type: application/json" -i \
-H "Authorization: Basic ${{ secrets.BIDRAG_CUCUMBER_CLOUD_AUTH }}" \
--request POST \
--data '{"tags":["@arbeidsflyt-endre-fagomrade"],"noContextPathForApps":["oppgave"],"ingressesForApps":[
"${{ env.INGRESS_OPPGAVE }}@oppgave"
]}' \
${{ 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 -X POST --data-urlencode "payload={\"channel\": \"#team-bidrag-dev\", \"username\": \"webhookbot\", \"text\": \"$MELDING\", \"icon_emoji\": \":boom:\"}" $WEBHOOK_URL
if: ${{ failure() }}
env:
MELDING: "<https://github.com/navikt/bidrag-cucumber-cloud/actions|Cucumber tests> for tag @arbeidsflyt-endre-fagomrade feilet"
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}
run-tests-for-arbeidsflyt-journalforing:
runs-on: ubuntu-latest
name: "arbeidsflyt-journalforing"
env:
INGRESS_OPPGAVE: https://oppgave.dev-fss-pub.nais.io
steps:
- run: |
curl -H "Content-Type: application/json" -i \
-H "Authorization: Basic ${{ secrets.BIDRAG_CUCUMBER_CLOUD_AUTH }}" \
--request POST \
--data '{"tags":["@arbeidsflyt-journalforing"],"noContextPathForApps":["oppgave"],"ingressesForApps":[
"${{ env.INGRESS_OPPGAVE }}@oppgave"
]}' \
${{ 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 -X POST --data-urlencode "payload={\"channel\": \"#team-bidrag-dev\", \"username\": \"webhookbot\", \"text\": \"$MELDING\", \"icon_emoji\": \":boom:\"}" $WEBHOOK_URL
if: ${{ failure() }}
env:
MELDING: "<https://github.com/navikt/bidrag-cucumber-cloud/actions|Cucumber tests> for tag @arbeidsflyt-journalforing feilet"
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}
run-tests-for-arbeidsflyt-opprett-oppgave:
runs-on: ubuntu-latest
name: "arbeidsflyt-opprett-oppgave"
env:
INGRESS_OPPGAVE: https://oppgave.dev-fss-pub.nais.io
steps:
- run: |
curl -H "Content-Type: application/json" -i \
-H "Authorization: Basic ${{ secrets.BIDRAG_CUCUMBER_CLOUD_AUTH }}" \
--request POST \
--data '{"tags":["@arbeidsflyt-opprett-oppgave"],"noContextPathForApps":["oppgave"],"ingressesForApps":[
"${{ env.INGRESS_OPPGAVE }}@oppgave"
]}' \
${{ 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 -X POST --data-urlencode "payload={\"channel\": \"#team-bidrag-dev\", \"username\": \"webhookbot\", \"text\": \"$MELDING\", \"icon_emoji\": \":boom:\"}" $WEBHOOK_URL
if: ${{ failure() }}
env:
MELDING: "<https://github.com/navikt/bidrag-cucumber-cloud/actions|Cucumber tests> for tag @arbeidsflyt-opprett-oppgave feilet"
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}
run-tests-for-bidrag-dokument-forsendelse:
runs-on: ubuntu-latest
name: "bidrag-dokument-forsendelse"
env:
INGRESS_DOKUMENT_FORSENDELSE: https://bidrag-dokument-forsendelse.intern.dev.nav.no
steps:
- run: |
curl -H "Content-Type: application/json" -i \
-H "Authorization: Basic ${{ secrets.BIDRAG_CUCUMBER_CLOUD_AUTH }}" \
--request POST \
--data '{"noContextPathForApps":["bidrag-dokument-forsendelse"],"ingressesForApps":[
"${{ env.INGRESS_DOKUMENT_FORSENDELSE }}@tag:bidrag-dokument-forsendelse"
]}' \
${{ 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 -X POST --data-urlencode "payload={\"channel\": \"#team-bidrag-dev\", \"username\": \"webhookbot\", \"text\": \"$MELDING\", \"icon_emoji\": \":boom:\"}" $WEBHOOK_URL
if: ${{ failure() }}
env:
MELDING: "<https://github.com/navikt/bidrag-cucumber-cloud/actions|Cucumber tests> for tag @bidrag-dokument-forsendelse"
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}