From 3f154c5a2c4c7cc494ac974032ddd48c18d9b790 Mon Sep 17 00:00:00 2001 From: Ugur Alpay Cenar Date: Thu, 7 Nov 2024 10:34:24 +0100 Subject: [PATCH] Oppgrader bidrag-felles --- .github/workflows/deploy_feature.yaml | 39 --------------------------- .github/workflows/deploy_q1.yaml | 4 ++- .github/workflows/pr.yaml | 27 +++---------------- 3 files changed, 7 insertions(+), 63 deletions(-) delete mode 100644 .github/workflows/deploy_feature.yaml diff --git a/.github/workflows/deploy_feature.yaml b/.github/workflows/deploy_feature.yaml deleted file mode 100644 index 7b906fd0..00000000 --- a/.github/workflows/deploy_feature.yaml +++ /dev/null @@ -1,39 +0,0 @@ -name: Deploy feature -on: - push: - branches: - - '**' - - '!main' - - '!dependabot/**' -env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - -jobs: - build-deploy: - name: "Build and deploy to feature" - permissions: - contents: "read" - id-token: "write" - uses: navikt/bidrag-workflow/.github/workflows/deploy.yaml@main - secrets: inherit - - run_cucumber_tests-feature: - runs-on: ubuntu-latest - name: Run cucumber tests feature - needs: build-deploy - if: false #${{ always() && needs.build-deploy.outputs.deploy_suksess == 'true' }} - - env: - INGRESS_CUCUMBER: https://bidrag-cucumber-cloud-feature.ekstern.dev.nav.no - INGRESS_VEDTAK: https://bidrag-vedtak-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-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) \ No newline at end of file diff --git a/.github/workflows/deploy_q1.yaml b/.github/workflows/deploy_q1.yaml index 48e2e215..b113e0d9 100644 --- a/.github/workflows/deploy_q1.yaml +++ b/.github/workflows/deploy_q1.yaml @@ -3,6 +3,8 @@ on: workflow_dispatch: push: branches: + - '**' + - '!main' - 'q1/**' - 'Q1/**' env: @@ -21,7 +23,7 @@ jobs: run_cucumber_tests-feature: runs-on: ubuntu-latest - name: Run cucumber tests feature + name: Run cucumber tests q1 needs: build-deploy if: false #${{ always() && needs.build-deploy.outputs.deploy_suksess == 'true' }} diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 373abfd4..6d905b8f 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -8,43 +8,24 @@ env: jobs: build-deploy: - name: "Build and deploy syntetisk" + name: "Build and deploy q2" 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 }} + nais_variabler_filnavn: q2.yaml run_cucumber_tests-syntetisk: runs-on: ubuntu-latest - name: Run cucumber tests syntetisk + name: Run cucumber tests needs: build-deploy if: ${{ always() && needs.build-deploy.outputs.deploy_suksess == 'true' }} env: INGRESS_CUCUMBER: https://bidrag-cucumber-cloud.ekstern.dev.nav.no - INGRESS_VEDTAK: https://bidrag-vedtak-syntetisk.intern.dev.nav.no + INGRESS_VEDTAK: https://bidrag-vedtak-q2.intern.dev.nav.no steps: - run: |