-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/fe/change-app-name
- Loading branch information
Showing
8 changed files
with
48 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,10 +45,10 @@ jobs: | |
needs: [images-test] | ||
env: | ||
ZONE: test | ||
DOMAIN: apps.silver.devops.gov.bc.ca | ||
# URL: forestclient-tst.nrs.gov.bc.ca | ||
URL: nr-forest-client-test-frontend.apps.silver.devops.gov.bc.ca | ||
BROKER_URL: https://nr-broker.apps.silver.devops.gov.bc.ca | ||
VAULT_ADDR: https://vault-iit.apps.silver.devops.gov.bc.ca | ||
PREFIX: ${{ github.event.repository.name }}-test | ||
environment: test | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
|
@@ -82,8 +82,7 @@ jobs: | |
-p COGNITO_USER_POOL=${{ secrets.COGNITO_USER_POOL }} | ||
-p COGNITO_DOMAIN=${{ secrets.COGNITO_DOMAIN }} | ||
-p COGNITO_ENVIRONMENT=TEST | ||
-p COGNITO_REDIRECT_URI=https://${{ env.PREFIX }}-frontend.${{ env.DOMAIN }}/dashboard | ||
-p COGNITO_LOGOUT_URI='https://logontest7.gov.bc.ca/clp-cgi/logoff.cgi?retnow=1&returl=https://test.loginproxy.gov.bc.ca/auth/realms/standard/protocol/openid-connect/logout?redirect_uri=${{ secrets.COGNITO_LOGOUT_URI }}' | ||
-p COGNITO_REDIRECT_URI=https://${{ env.URL }}/dashboard | ||
-p CHES_MAIL_COPY=${{ secrets.CHES_MAIL_COPY }} | ||
|
||
- name: Conventional Changelog Update | ||
|
@@ -113,8 +112,9 @@ jobs: | |
name: TEST Deployment | ||
needs: [test-init] | ||
env: | ||
# URL: forestclient-tst.nrs.gov.bc.ca | ||
URL: nr-forest-client-test-frontend.apps.silver.devops.gov.bc.ca | ||
ZONE: test | ||
DOMAIN: apps.silver.devops.gov.bc.ca | ||
environment: test | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
|
@@ -169,7 +169,7 @@ jobs: | |
-p BCREGISTRY_URI='https://bcregistry-prod.apigee.net' | ||
-p COGNITO_REGION=ca-central-1 | ||
-p COGNITO_COOKIE_DOMAIN=gov.bc.ca | ||
-p URL_ZONE=${{ env.ZONE }} | ||
-p FRONTEND_URL=${{ env.URL }} | ||
|
||
- name: Dev data replacement | ||
uses: bcgov-nr/[email protected] | ||
|
@@ -193,7 +193,6 @@ jobs: | |
parameters: | ||
-p ZONE=${{ env.ZONE }} -p NAME=${{ github.event.repository.name }} | ||
-p PROMOTE=${{ github.repository }}/legacy:${{ env.ZONE }} | ||
-p URL_ZONE=${{ env.ZONE }} | ||
|
||
- name: Deploy Frontend | ||
uses: bcgov-nr/[email protected] | ||
|
@@ -208,13 +207,12 @@ jobs: | |
-p PROMOTE=${{ github.repository }}/frontend:${{ env.ZONE }} | ||
-p GREEN_DOMAIN=${{ secrets.GREEN_DOMAIN }} | ||
-p VITE_NODE_ENV=openshift-${{ env.ZONE }} | ||
-p URL_ZONE=${{ env.ZONE }} | ||
-p URL=${{ env.URL }} | ||
-p COGNITO_REGION=${{ secrets.COGNITO_REGION }} | ||
-p COGNITO_CLIENT_ID=${{ secrets.COGNITO_CLIENT_ID }} | ||
-p COGNITO_USER_POOL=${{ secrets.COGNITO_USER_POOL }} | ||
-p COGNITO_DOMAIN=${{ secrets.COGNITO_DOMAIN }} | ||
-p COGNITO_ENVIRONMENT=TEST | ||
-p COGNITO_REDIRECT_URI=https://${{ env.PREFIX }}-frontend.${{ env.DOMAIN }}/dashboard | ||
-p COGNITO_LOGOUT_URI='https://logontest7.gov.bc.ca/clp-cgi/logoff.cgi?retnow=1&returl=https://test.loginproxy.gov.bc.ca/auth/realms/standard/protocol/openid-connect/logout?redirect_uri=${{ secrets.COGNITO_LOGOUT_URI }}' | ||
|
||
- name: Deploy Processor | ||
|
@@ -229,7 +227,6 @@ jobs: | |
parameters: | ||
-p ZONE=${{ env.ZONE }} -p NAME=${{ github.event.repository.name }} | ||
-p PROMOTE=${{ github.repository }}/processor:${{ env.ZONE }} | ||
-p URL_ZONE=${{ env.ZONE }} | ||
-p BCREGISTRY_URI='https://bcregistry-prod.apigee.net' | ||
|
||
images-prod: | ||
|
@@ -251,9 +248,9 @@ jobs: | |
name: PROD Init | ||
needs: [images-prod] | ||
env: | ||
# URL: forestclient.nrs.gov.bc.ca | ||
URL: nr-forest-client-prod-frontend.apps.silver.devops.gov.bc.ca | ||
ZONE: prod | ||
DOMAIN: apps.silver.devops.gov.bc.ca | ||
PREFIX: ${{ github.event.repository.name }}-prod | ||
environment: prod | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
|
@@ -287,8 +284,7 @@ jobs: | |
-p COGNITO_USER_POOL=${{ secrets.COGNITO_USER_POOL }} | ||
-p COGNITO_DOMAIN=${{ secrets.COGNITO_DOMAIN }} | ||
-p COGNITO_ENVIRONMENT=PROD | ||
-p COGNITO_REDIRECT_URI=https://forestclient.nrs.gov.bc.ca/dashboard | ||
-p COGNITO_LOGOUT_URI='https://logon7.gov.bc.ca/clp-cgi/logoff.cgi?retnow=1&returl=https://loginproxy.gov.bc.ca/auth/realms/standard/protocol/openid-connect/logout?redirect_uri=${{ secrets.COGNITO_LOGOUT_URI }}' | ||
-p COGNITO_REDIRECT_URI=https://${{ env.URL }}/dashboard | ||
-p CHES_MAIL_COPY=${{ secrets.CHES_MAIL_COPY }} | ||
|
||
prod-deploy: | ||
|
@@ -297,8 +293,9 @@ jobs: | |
env: | ||
PREV: test | ||
ZONE: prod | ||
DOMAIN: apps.silver.devops.gov.bc.ca | ||
environment: prod | ||
# URL: forestclient.nrs.gov.bc.ca | ||
URL: nr-forest-client-prod-frontend.apps.silver.devops.gov.bc.ca | ||
environment: prod | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -319,7 +316,8 @@ jobs: | |
continue-on-error: true | ||
run: | | ||
oc login --token=${{ secrets.OC_TOKEN }} --server=${{ secrets.OC_SERVER }} | ||
oc project ${{ secrets.OC_NAMESPACE }} | ||
oc project ${{ secrets.OC_NAMESPACE }} # Safeguard! | ||
# Run a backup before deploying a new version | ||
oc create job --from=cronjob/${{ github.event.repository.name }}-${{ env.ZONE }}-database-backup ${{ github.event.repository.name }}-${{ env.ZONE }}-database-backup-$(date +%Y%m%d%H%M%S) | ||
|
@@ -352,7 +350,7 @@ jobs: | |
-p BCREGISTRY_URI='https://bcregistry-prod.apigee.net' | ||
-p COGNITO_REGION=ca-central-1 | ||
-p COGNITO_COOKIE_DOMAIN=gov.bc.ca | ||
-p URL_ZONE=${{ env.ZONE }} | ||
-p FRONTEND_URL=${{ env.URL }} | ||
|
||
- name: Deploy Legacy | ||
uses: bcgov-nr/[email protected] | ||
|
@@ -366,7 +364,6 @@ jobs: | |
parameters: | ||
-p ZONE=${{ env.ZONE }} -p NAME=${{ github.event.repository.name }} | ||
-p PROMOTE=${{ github.repository }}/legacy:${{ env.PREV }} | ||
-p URL_ZONE=${{ env.ZONE }} | ||
|
||
- name: Deploy Frontend | ||
uses: bcgov-nr/[email protected] | ||
|
@@ -381,13 +378,12 @@ jobs: | |
-p PROMOTE=${{ github.repository }}/frontend:${{ env.PREV }} | ||
-p GREEN_DOMAIN=${{ secrets.GREEN_DOMAIN }} | ||
-p VITE_NODE_ENV=openshift-${{ env.ZONE }} | ||
-p URL_ZONE=${{ env.ZONE }} | ||
-p URL=${{ env.URL }} | ||
-p COGNITO_REGION=${{ secrets.COGNITO_REGION }} | ||
-p COGNITO_CLIENT_ID=${{ secrets.COGNITO_CLIENT_ID }} | ||
-p COGNITO_USER_POOL=${{ secrets.COGNITO_USER_POOL }} | ||
-p COGNITO_DOMAIN=${{ secrets.COGNITO_DOMAIN }} | ||
-p COGNITO_ENVIRONMENT=PROD | ||
-p COGNITO_REDIRECT_URI=https://forestclient.nrs.gov.bc.ca/dashboard | ||
-p COGNITO_LOGOUT_URI='https://logon7.gov.bc.ca/clp-cgi/logoff.cgi?retnow=1&returl=https://loginproxy.gov.bc.ca/auth/realms/standard/protocol/openid-connect/logout?redirect_uri=${{ secrets.COGNITO_LOGOUT_URI }}' | ||
|
||
- name: Deploy Processor | ||
|
@@ -402,5 +398,4 @@ jobs: | |
parameters: | ||
-p ZONE=${{ env.ZONE }} -p NAME=${{ github.event.repository.name }} | ||
-p PROMOTE=${{ github.repository }}/processor:${{ env.PREV }} | ||
-p URL_ZONE=${{ env.ZONE }} | ||
-p BCREGISTRY_URI='https://bcregistry-prod.apigee.net' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,13 +15,12 @@ jobs: | |
runs-on: ubuntu-latest | ||
outputs: | ||
semver: ${{ steps.semver.outputs.tag }} | ||
url_zone: ${{ steps.calculate.outputs.url_zone }} | ||
url: ${{ steps.calculate.outputs.url }} | ||
steps: | ||
# steps.semver.outputs.tag => needs.vars.outputs.semver | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: refs/heads/${{ github.event.repository.default_branch }} | ||
|
||
# steps.semver.outputs.tag => needs.vars.outputs.semver | ||
- name: Conventional Changelog Update | ||
uses: TriPSs/[email protected] | ||
id: semver | ||
|
@@ -32,16 +31,15 @@ jobs: | |
skip-on-empty: 'false' | ||
skip-version-file: 'true' | ||
|
||
- uses: actions/checkout@v4 | ||
|
||
# steps.calculate.outputs.url => needs.vars.outputs.url | ||
- name: Calculate the deployment number | ||
id: calculate | ||
run: | | ||
echo "url_zone=$((${{ github.event.number }} % 50))" >> $GITHUB_OUTPUT | ||
echo "url=${{ github.event.repository.name }}-$((${{ github.event.number }} % 50))-frontend.apps.silver.devops.gov.bc.ca" >> $GITHUB_OUTPUT | ||
- run: | | ||
echo "semver=${{ steps.semver.outputs.tag}}" | ||
echo "url_zone=${{ steps.calculate.outputs.url_zone}}" | ||
echo "semver=${{ steps.semver.outputs.tag }}" | ||
echo "url=${{ steps.calculate.outputs.url }}" | ||
builds: | ||
name: Builds | ||
|
@@ -71,7 +69,7 @@ jobs: | |
environment: dev | ||
env: | ||
DOMAIN: apps.silver.devops.gov.bc.ca | ||
PREFIX: ${{ github.event.repository.name }}-${{ needs.vars.outputs.url_zone }} | ||
PREFIX: ${{ needs.vars.outputs.url }} | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -105,8 +103,7 @@ jobs: | |
-p COGNITO_USER_POOL=${{ secrets.COGNITO_USER_POOL }} | ||
-p COGNITO_DOMAIN=${{ secrets.COGNITO_DOMAIN }} | ||
-p COGNITO_ENVIRONMENT=DEV | ||
-p COGNITO_REDIRECT_URI=https://${{ env.PREFIX }}-frontend.${{ env.DOMAIN }}/dashboard | ||
-p COGNITO_LOGOUT_URI='https://logontest7.gov.bc.ca/clp-cgi/logoff.cgi?retnow=1&returl=https://dev.loginproxy.gov.bc.ca/auth/realms/standard/protocol/openid-connect/logout?redirect_uri=https://${{ env.PREFIX }}-frontend.${{ env.DOMAIN }}' | ||
-p COGNITO_REDIRECT_URI=https://${{ github.event.repository.name }}-${{ github.event.number }}-frontend.apps.silver.devops.gov.bc.ca/dashboard | ||
-p CHES_MAIL_COPY=${{ secrets.CHES_MAIL_COPY }} | ||
|
||
- name: Deploy Database Backup | ||
|
@@ -160,7 +157,7 @@ jobs: | |
-p BCREGISTRY_URI='https://bcregistry-prod.apigee.net' | ||
-p COGNITO_REGION=ca-central-1 | ||
-p COGNITO_COOKIE_DOMAIN=gov.bc.ca | ||
-p URL_ZONE=${{ needs.vars.outputs.url_zone }} | ||
-p FRONTEND_URL=${{ needs.vars.outputs.url }} | ||
|
||
- name: Dev data replacement | ||
uses: bcgov-nr/[email protected] | ||
|
@@ -184,7 +181,6 @@ jobs: | |
parameters: | ||
-p ZONE=${{ github.event.number }} | ||
-p PROMOTE=${{ github.repository }}/legacy:${{ github.event.number }} | ||
-p URL_ZONE=${{ needs.vars.outputs.url_zone }} | ||
|
||
- name: Deploy Frontend | ||
uses: bcgov-nr/[email protected] | ||
|
@@ -198,15 +194,14 @@ jobs: | |
-p ZONE=${{ github.event.number }} | ||
-p PROMOTE=${{ github.repository }}/frontend:${{ github.event.number }} | ||
-p VITE_NODE_ENV=openshift-dev | ||
-p URL_ZONE=${{ needs.vars.outputs.url_zone }} | ||
-p URL=${{ needs.vars.outputs.url }} | ||
-p GREEN_DOMAIN=${{ secrets.GREEN_DOMAIN }} | ||
-p COGNITO_REGION=${{ secrets.COGNITO_REGION }} | ||
-p COGNITO_CLIENT_ID=${{ secrets.COGNITO_CLIENT_ID }} | ||
-p COGNITO_USER_POOL=${{ secrets.COGNITO_USER_POOL }} | ||
-p COGNITO_DOMAIN=${{ secrets.COGNITO_DOMAIN }} | ||
-p COGNITO_ENVIRONMENT=DEV | ||
-p COGNITO_REDIRECT_URI=https://${{ env.PREFIX }}-frontend.${{ env.DOMAIN }}/dashboard | ||
-p COGNITO_LOGOUT_URI='https://logontest7.gov.bc.ca/clp-cgi/logoff.cgi?retnow=1&returl=https://dev.loginproxy.gov.bc.ca/auth/realms/standard/protocol/openid-connect/logout?redirect_uri=https://${{ env.PREFIX }}-frontend.${{ env.DOMAIN }}' | ||
-p COGNITO_LOGOUT_URI='https://logontest7.gov.bc.ca/clp-cgi/logoff.cgi?retnow=1&returl=https://dev.loginproxy.gov.bc.ca/auth/realms/standard/protocol/openid-connect/logout?redirect_uri=https://${{ github.event.repository.name }}-${{ github.event.number }}-frontend.apps.silver.devops.gov.bc.ca' | ||
|
||
- name: Deploy Processor | ||
uses: bcgov-nr/[email protected] | ||
|
@@ -220,7 +215,6 @@ jobs: | |
parameters: | ||
-p ZONE=${{ github.event.number }} | ||
-p PROMOTE=${{ github.repository }}/processor:${{ github.event.number }} | ||
-p URL_ZONE=${{ needs.vars.outputs.url_zone }} | ||
-p BCREGISTRY_URI='https://bcregistry-prod.apigee.net' | ||
|
||
cypress-run: | ||
|
@@ -229,8 +223,7 @@ jobs: | |
needs: [deploy, vars] | ||
environment: dev | ||
env: | ||
DOMAIN: apps.silver.devops.gov.bc.ca | ||
PREFIX: ${{ github.event.repository.name }}-${{ needs.vars.outputs.url_zone }} | ||
URL: ${{ needs.vars.outputs.url }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
@@ -245,7 +238,7 @@ jobs: | |
with: | ||
working-directory: cypress | ||
env: | ||
CYPRESS_baseUrl: https://${{ env.PREFIX }}-frontend.${{ env.DOMAIN }} | ||
CYPRESS_baseUrl: https://${{ env.URL }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Publish Cypress Results | ||
|
@@ -273,4 +266,4 @@ jobs: | |
with: | ||
name: cypress-videos | ||
path: cypress/cypress/videos | ||
retention-days: 7 | ||
retention-days: 7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,19 +13,19 @@ jobs: | |
name: Variables | ||
runs-on: ubuntu-22.04 | ||
outputs: | ||
url_zone: ${{ steps.calculate.outputs.url_zone }} | ||
url: ${{ steps.calculate.outputs.url }} | ||
steps: | ||
- name: Calculate the deployment number | ||
id: calculate | ||
run: echo "url_zone=$((${{ github.event.number }} % 50))" >> $GITHUB_OUTPUT | ||
run: echo "url=$((${{ github.event.number }} % 50))" >> $GITHUB_OUTPUT | ||
|
||
validate: | ||
name: Validate PR | ||
needs: [vars] | ||
uses: bcgov/quickstart-openshift-helpers/.github/workflows/[email protected] | ||
with: | ||
markdown_links: | | ||
Any successful deployments (not always required) will be available [here](https://${{ github.event.repository.name }}-${{ needs.vars.outputs.url_zone }}-frontend.apps.silver.devops.gov.bc.ca/) | ||
Any successful deployments (not always required) will be available [here](https://${{ github.event.repository.name }}-${{ needs.vars.outputs.url }}-frontend.apps.silver.devops.gov.bc.ca/) | ||
changelog: | ||
name: Pull Request Validation | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.