From 7708bdda3bbb68bcd4756fc319a72cb9aa0daedc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simen=20H=C3=B8ston?= Date: Thu, 3 Oct 2024 12:43:21 +0200 Subject: [PATCH] =?UTF-8?q?Oppretter=20nye=20milj=C3=B8er=20for=20q1,=20q2?= =?UTF-8?q?=20og=20q4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy_q1.yaml | 48 +++++++++++++++++++++++++++++ .github/workflows/deploy_q2.yaml | 48 +++++++++++++++++++++++++++++ .github/workflows/deploy_q4.yaml | 52 ++++++++++++++++++++++++++++++++ .nais/prod.yaml | 6 ++-- .nais/q1.yaml | 33 ++++++++++++++++++++ .nais/q2.yaml | 33 ++++++++++++++++++++ .nais/q4.yaml | 33 ++++++++++++++++++++ 7 files changed, 250 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/deploy_q1.yaml create mode 100644 .github/workflows/deploy_q2.yaml create mode 100644 .github/workflows/deploy_q4.yaml create mode 100644 .nais/q1.yaml create mode 100644 .nais/q2.yaml create mode 100644 .nais/q4.yaml diff --git a/.github/workflows/deploy_q1.yaml b/.github/workflows/deploy_q1.yaml new file mode 100644 index 0000000..ef66c5e --- /dev/null +++ b/.github/workflows/deploy_q1.yaml @@ -0,0 +1,48 @@ +name: Deploy q1 +on: + 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) diff --git a/.github/workflows/deploy_q2.yaml b/.github/workflows/deploy_q2.yaml new file mode 100644 index 0000000..f99ee2b --- /dev/null +++ b/.github/workflows/deploy_q2.yaml @@ -0,0 +1,48 @@ +name: Deploy q2 +on: + push: + branches: + - 'q2/**' + - 'Q2/**' + +jobs: + build_and_deploy: + name: "Build and deploy to q2" + permissions: + contents: "read" + id-token: "write" + uses: navikt/bidrag-workflow/.github/workflows/deploy.yaml@main + secrets: inherit + with: + nais_variabler_filnavn: q2.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-q2.intern.dev.nav.no + INGRESS_VEDTAK: https://bidrag-vedtak-q2.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) diff --git a/.github/workflows/deploy_q4.yaml b/.github/workflows/deploy_q4.yaml new file mode 100644 index 0000000..3715cc2 --- /dev/null +++ b/.github/workflows/deploy_q4.yaml @@ -0,0 +1,52 @@ +name: Deploy q4 +on: + push: + branches: + - '**' + - '!main' + - '!q1/**' + - '!Q1/**' + - '!q2/**' + - '!Q2/**' + +jobs: + build_and_deploy: + name: "Build and deploy to q4" + permissions: + contents: "read" + id-token: "write" + uses: navikt/bidrag-workflow/.github/workflows/deploy.yaml@main + secrets: inherit + with: + nais_variabler_filnavn: q4.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-feature.ekstern.dev.nav.no + INGRESS_STONAD: https://bidrag-stonad-q4.intern.dev.nav.no + INGRESS_VEDTAK: https://bidrag-vedtak-q4.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) diff --git a/.nais/prod.yaml b/.nais/prod.yaml index 925b04b..b6c6c3a 100644 --- a/.nais/prod.yaml +++ b/.nais/prod.yaml @@ -7,12 +7,12 @@ kafka: kafka-topic-vedtak: bidrag.vedtak spring-profiles: live,nais,database-legacy azureAccessInbound: - - application: bidrag-stonad - namespace: bidrag - cluster: prod-gcp - application: bidrag-behandling namespace: bidrag cluster: prod-gcp + - application: bisys + namespace: bidrag + cluster: prod-fss spec: replicas: min: 2 diff --git a/.nais/q1.yaml b/.nais/q1.yaml new file mode 100644 index 0000000..aada5bf --- /dev/null +++ b/.nais/q1.yaml @@ -0,0 +1,33 @@ +name: bidrag-stonad-q1 +ingresses: + - https://bidrag-stonad-q1.intern.dev.nav.no +dbname: bidrag-stonad-q1 +kafka: + pool: nav-dev +kafka-topic-vedtak: bidrag.vedtak-q1 +spring-profiles: live,nais,database-new +azureAccessInbound: + - application: bidrag-cucumber-cloud + namespace: bidrag + cluster: dev-gcp + - application: bidrag-behandling-q1 + namespace: bidrag + cluster: dev-gcp + - application: bisys + namespace: bidrag + cluster: dev-fss +spec: + replicas: + min: 1 + max: 1 + resources: + limits: + cpu: 1000m + memory: 2048Mi + requests: + cpu: 100m + memory: 128Mi + gcp: + sqlInstances: + tier: db-f1-micro + diskAutoresize: false \ No newline at end of file diff --git a/.nais/q2.yaml b/.nais/q2.yaml new file mode 100644 index 0000000..fc8cd1d --- /dev/null +++ b/.nais/q2.yaml @@ -0,0 +1,33 @@ +name: bidrag-stonad-q2 +ingresses: + - https://bidrag-stonad-q2.intern.dev.nav.no +dbname: bidrag-stonad-q2 +kafka: + pool: nav-dev +kafka-topic-vedtak: bidrag.vedtak-q2 +spring-profiles: live,nais,database-new +azureAccessInbound: + - application: bidrag-cucumber-cloud + namespace: bidrag + cluster: dev-gcp + - application: bidrag-behandling-q2 + namespace: bidrag + cluster: dev-gcp + - application: bisys + namespace: bidrag + cluster: dev-fss +spec: + replicas: + min: 1 + max: 1 + resources: + limits: + cpu: 1000m + memory: 2048Mi + requests: + cpu: 100m + memory: 128Mi + gcp: + sqlInstances: + tier: db-f1-micro + diskAutoresize: false \ No newline at end of file diff --git a/.nais/q4.yaml b/.nais/q4.yaml new file mode 100644 index 0000000..2b2df97 --- /dev/null +++ b/.nais/q4.yaml @@ -0,0 +1,33 @@ +name: bidrag-stonad-q4 +ingresses: + - https://bidrag-stonad-q4.intern.dev.nav.no +dbname: bidrag-stonad-q4 +kafka: + pool: nav-dev +kafka-topic-vedtak: bidrag.vedtak-q4 +spring-profiles: live,nais,database-new +azureAccessInbound: + - application: bidrag-cucumber-cloud-feature + namespace: bidrag + cluster: dev-gcp + - application: bidrag-behandling-q4 + namespace: bidrag + cluster: dev-gcp + - application: bisys + namespace: bidrag + cluster: dev-fss +spec: + replicas: + min: 1 + max: 1 + resources: + limits: + cpu: 1000m + memory: 2048Mi + requests: + cpu: 100m + memory: 128Mi + gcp: + sqlInstances: + tier: db-f1-micro + diskAutoresize: false \ No newline at end of file