generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): deploymentconfig deprecation (#701)
* chore(ci): deploymentconfig deprecation * Drop imagestreams * Random envar to ensure rollouts * Remove promote param * Temporarily comment out workflow jobs * Remove param * Remove param * Fix ZONE var reset * Template fix * Use one init job * Adjust image paths * Restore workflows * Restore workflows * Promote PROD images before deployment
- Loading branch information
1 parent
520e6a3
commit 0e3ea4b
Showing
8 changed files
with
102 additions
and
204 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 |
---|---|---|
|
@@ -55,7 +55,6 @@ jobs: | |
file: api/openshift.deploy.yml | ||
overwrite: true | ||
parameters: | ||
-p OC_NAMESPACE=${{ vars.OC_NAMESPACE }} | ||
-p URL=fom-demo.apps.silver.devops.gov.bc.ca | ||
-p [email protected] | ||
-p DB_TESTDATA=true | ||
|
@@ -69,7 +68,6 @@ jobs: | |
- name: db | ||
file: db/openshift.deploy.yml | ||
overwrite: false | ||
parameters: -p OC_NAMESPACE=${{ vars.OC_NAMESPACE }} | ||
- name: init | ||
file: libs/openshift.init.yml | ||
overwrite: false | ||
|
@@ -87,5 +85,4 @@ jobs: | |
overwrite: ${{ matrix.overwrite }} | ||
penetration_test: false | ||
parameters: | ||
-p PROMOTE=ghcr.io/${{ github.repository }}/${{ matrix.name }}:${{ env.ZONE }} | ||
-p ZONE=${{ env.ZONE }} ${{ matrix.parameters }} |
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 |
---|---|---|
|
@@ -32,7 +32,6 @@ jobs: | |
oc_version: "4.13" | ||
overwrite: true | ||
parameters: | ||
-p OC_NAMESPACE=${{ vars.OC_NAMESPACE }} | ||
-p URL=fom-test.nrs.gov.bc.ca | ||
-p [email protected] | ||
-p DB_TESTDATA=true | ||
|
@@ -45,7 +44,6 @@ jobs: | |
- name: db | ||
file: db/openshift.deploy.yml | ||
overwrite: false | ||
parameters: -p OC_NAMESPACE=${{ vars.OC_NAMESPACE }} | ||
- name: init | ||
file: libs/openshift.init.yml | ||
overwrite: false | ||
|
@@ -64,13 +62,27 @@ jobs: | |
overwrite: ${{ matrix.overwrite }} | ||
penetration_test: false | ||
parameters: | ||
-p PROMOTE=${{ github.repository }}/${{ matrix.name }}:${{ env.ZONE }} | ||
-p ZONE=${{ env.ZONE }} ${{ matrix.parameters }} | ||
post_rollout: ${{ matrix.post_rollout }} | ||
|
||
prod-promotions: | ||
name: Promote images to PROD | ||
needs: [deploy-test] | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
component: [api, admin, db, public] | ||
steps: | ||
- uses: shrink/actions-docker-registry-tag@v4 | ||
with: | ||
registry: ghcr.io | ||
repository: ${{ github.repository }}/${{ matrix.component }} | ||
target: test | ||
tags: prod | ||
|
||
deploy-prod: | ||
name: PROD Deploys | ||
needs: [deploy-test] | ||
needs: [prod-promotions] | ||
environment: prod | ||
env: | ||
ZONE: prod | ||
|
@@ -85,7 +97,6 @@ jobs: | |
oc_version: "4.13" | ||
overwrite: true | ||
parameters: | ||
-p OC_NAMESPACE=${{ vars.OC_NAMESPACE }} | ||
-p URL=fom.nrs.gov.bc.ca | ||
-p AWS_USER_POOLS_WEB_CLIENT_ID="4bu2n8at3m32a2fqnvd4t06la1" | ||
-p LOGOUT_CHAIN_URL="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=" | ||
|
@@ -98,7 +109,6 @@ jobs: | |
- name: db | ||
file: db/openshift.deploy.yml | ||
overwrite: false | ||
parameters: -p OC_NAMESPACE=${{ vars.OC_NAMESPACE }} | ||
- name: init | ||
file: libs/openshift.init.yml | ||
overwrite: false | ||
|
@@ -117,21 +127,5 @@ jobs: | |
overwrite: ${{ matrix.overwrite }} | ||
penetration_test: false | ||
parameters: | ||
-p PROMOTE=${{ github.repository }}/${{ matrix.name }}:test | ||
-p ZONE=${{ env.ZONE }} ${{ matrix.parameters }} | ||
post_rollout: ${{ matrix.post_rollout }} | ||
|
||
image-promotions: | ||
name: Promote images to PROD | ||
needs: [deploy-prod] | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
component: [api, admin, db, public] | ||
steps: | ||
- uses: shrink/actions-docker-registry-tag@v4 | ||
with: | ||
registry: ghcr.io | ||
repository: ${{ github.repository }}/${{ matrix.component }} | ||
target: test | ||
tags: prod |
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 |
---|---|---|
|
@@ -9,24 +9,19 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
jobs: | ||
setup: | ||
name: Reset the deployment number | ||
init: | ||
name: Init | ||
permissions: | ||
pull-requests: write | ||
runs-on: ubuntu-22.04 | ||
outputs: | ||
zone: ${{ steps.calculate.outputs.zone }} | ||
route_number: ${{ steps.calculate.outputs.route_number }} | ||
steps: | ||
- name: Calculate the deployment number | ||
id: calculate | ||
run: | | ||
echo "zone=$((${{ github.event.number }} % 50))" >> $GITHUB_OUTPUT | ||
echo "route_number=$((${{ github.event.number }} % 50))" >> $GITHUB_OUTPUT | ||
prep: | ||
name: Prep | ||
permissions: | ||
pull-requests: write | ||
runs-on: ubuntu-22.04 | ||
needs: setup | ||
steps: | ||
- name: OpenShift Init | ||
uses: bcgov-nr/[email protected] | ||
with: | ||
|
@@ -35,17 +30,14 @@ jobs: | |
oc_token: ${{ secrets.OC_TOKEN }} | ||
file: libs/openshift.init.yml | ||
overwrite: false | ||
parameters: -p ZONE=${{ needs.setup.outputs.zone }} | ||
parameters: -p ZONE=${{ github.event.number }} | ||
triggers: ('db/' 'libs/' 'api/' 'admin/' 'public/') | ||
|
||
builds: | ||
name: Builds | ||
runs-on: ubuntu-22.04 | ||
permissions: | ||
packages: write | ||
needs: setup | ||
env: | ||
ZONE: ${{ needs.setup.outputs.zone }} | ||
strategy: | ||
matrix: | ||
package: [admin, api, db, public] | ||
|
@@ -72,17 +64,15 @@ jobs: | |
build_context: ${{ matrix.build_context }} | ||
build_file: ${{ matrix.build_file }} | ||
keep_versions: 100 | ||
tag: ${{ env.ZONE }} | ||
tag: ${{ github.event.number }} | ||
tag_fallback: test | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
triggers: ${{ matrix.triggers }} | ||
|
||
deploys: | ||
name: Deploys | ||
needs: [prep, builds, setup] | ||
needs: [builds, init] | ||
runs-on: ubuntu-22.04 | ||
env: | ||
ZONE: ${{ needs.setup.outputs.zone }} | ||
timeout-minutes: 10 | ||
strategy: | ||
matrix: | ||
|
@@ -92,7 +82,6 @@ jobs: | |
file: api/openshift.deploy.yml | ||
overwrite: true | ||
parameters: | ||
-p OC_NAMESPACE=${{ vars.OC_NAMESPACE }} | ||
-p REPLICA_COUNT=1 | ||
-p [email protected] | ||
-p DB_TESTDATA=true | ||
|
@@ -107,7 +96,6 @@ jobs: | |
- name: db | ||
file: db/openshift.deploy.yml | ||
overwrite: false | ||
parameters: -p OC_NAMESPACE=${{ vars.OC_NAMESPACE }} | ||
triggers: ('db/' 'libs/' 'api/' 'admin/' 'public/') | ||
- name: public | ||
file: public/openshift.deploy.yml | ||
|
@@ -124,7 +112,6 @@ jobs: | |
overwrite: ${{ matrix.overwrite }} | ||
penetration_test: false | ||
parameters: | ||
-p PROMOTE=${{ github.repository }}/${{ matrix.name }}:${{ env.ZONE }} | ||
-p URL=fom-${{ env.ZONE }}.apps.silver.devops.gov.bc.ca | ||
-p ZONE=${{ env.ZONE }} ${{ matrix.parameters }} | ||
-p URL=fom-${{ needs.init.outputs.route_number }}.apps.silver.devops.gov.bc.ca | ||
-p ZONE=${{ github.event.number }} ${{ matrix.parameters }} | ||
triggers: ${{ matrix.triggers }} |
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.