Skip to content

Allow behandling-feature on stonad main #290

Allow behandling-feature on stonad main

Allow behandling-feature on stonad main #290

Workflow file for this run

name: Deploy to dev
on:
pull_request:
types: [ ready_for_review, opened, synchronize ]
jobs:
build-deploy:
name: "Build and deploy syntetisk"
permissions:
contents: "read"
id-token: "write"
uses: navikt/bidrag-workflow/.github/workflows/deploy.yaml@main
secrets: inherit
with:
nais_variabler_filnavn: syntetisk.yaml
deploy_main:
runs-on: ubuntu-latest
name: Deploy main
permissions:
contents: "read"
id-token: "write"
if: github.actor != 'dependabot[bot]'
needs: build-deploy
steps:
- uses: actions/checkout@v4
- name: Deploy to dev-gcp
uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: dev-gcp
RESOURCE: .nais/nais.yaml
VARS: .nais/main.yaml
IMAGE: ${{ needs.build-deploy.outputs.image }}
run_cucumber_tests:
runs-on: ubuntu-latest
name: Run cucumber tests
needs: deploy_main
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.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)