Skip to content

Outbound access

Outbound access #166

Workflow file for this run

name: Deploy feature
on:
push:
branches:
- '**'
- '!main'
- '!dependabot/**'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
build-deploy:
name: "Build and deploy"
permissions:
contents: "read"
id-token: "write"
uses: navikt/bidrag-workflow/.github/workflows/deploy.yaml@main
secrets: inherit
run_cucumber_tests:
runs-on: ubuntu-latest
name: Run cucumber tests
needs: build-deploy
if: ${{ always() && needs.build-deploy.outputs.deploy_suksess == 'true' }}
env:
INGRESS_CUCUMBER: https://bidrag-cucumber-cloud-feature.ekstern.dev.nav.no
INGRESS_GRUNNLAG: https://bidrag-grunnlag-feature.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)