Skip to content

Commit

Permalink
Merge pull request #242 from navikt/q1/nyemiljøer
Browse files Browse the repository at this point in the history
Oppretter nye miljøer for q1, q2 og q4
  • Loading branch information
simhos authored Oct 3, 2024
2 parents 7e6d749 + 7708bdd commit 9f1ec63
Show file tree
Hide file tree
Showing 7 changed files with 250 additions and 3 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/deploy_q1.yaml
Original file line number Diff line number Diff line change
@@ -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)
48 changes: 48 additions & 0 deletions .github/workflows/deploy_q2.yaml
Original file line number Diff line number Diff line change
@@ -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)
52 changes: 52 additions & 0 deletions .github/workflows/deploy_q4.yaml
Original file line number Diff line number Diff line change
@@ -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)
6 changes: 3 additions & 3 deletions .nais/prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
33 changes: 33 additions & 0 deletions .nais/q1.yaml
Original file line number Diff line number Diff line change
@@ -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
33 changes: 33 additions & 0 deletions .nais/q2.yaml
Original file line number Diff line number Diff line change
@@ -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
33 changes: 33 additions & 0 deletions .nais/q4.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 9f1ec63

Please sign in to comment.