-
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.
ci(deps): updating deployer and workflows (#1185)
- Loading branch information
1 parent
8889e26
commit 162cf23
Showing
11 changed files
with
124 additions
and
65 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ jobs: | |
name: Set Variables | ||
outputs: | ||
pr: ${{ steps.pr.outputs.pr }} | ||
runs-on: ubuntu-22.04 | ||
runs-on: ubuntu-24.04 | ||
timeout-minutes: 1 | ||
steps: | ||
# Get PR number for squash merges to main | ||
|
@@ -28,7 +28,7 @@ jobs: | |
images-test: | ||
name: Promote images to TEST | ||
needs: [vars] | ||
runs-on: ubuntu-22.04 | ||
runs-on: ubuntu-24.04 | ||
strategy: | ||
matrix: | ||
component: [backend, database, frontend, legacy, processor] | ||
|
@@ -47,16 +47,17 @@ jobs: | |
ZONE: test | ||
URL: forestclient-tst.nrs.gov.bc.ca | ||
environment: test | ||
runs-on: ubuntu-22.04 | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Deploys | ||
uses: bcgov-nr/[email protected].0 | ||
uses: bcgov-nr/[email protected].1 | ||
with: | ||
file: common/openshift.init.yml | ||
oc_namespace: ${{ secrets.OC_NAMESPACE }} | ||
oc_server: ${{ secrets.OC_SERVER }} | ||
oc_token: ${{ secrets.OC_TOKEN }} | ||
oc_version: "4.13" | ||
overwrite: true | ||
parameters: | ||
-p ZONE=${{ env.ZONE }} -p NAME=${{ github.event.repository.name }} | ||
|
@@ -108,17 +109,18 @@ jobs: | |
URL: forestclient-tst.nrs.gov.bc.ca | ||
ZONE: test | ||
environment: test | ||
runs-on: ubuntu-22.04 | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Deploy Database Backup | ||
uses: bcgov-nr/[email protected].0 | ||
uses: bcgov-nr/[email protected].1 | ||
with: | ||
file: database/openshift.backup.yml | ||
oc_namespace: ${{ secrets.OC_NAMESPACE }} | ||
oc_server: ${{ secrets.OC_SERVER }} | ||
oc_token: ${{ secrets.OC_TOKEN }} | ||
oc_version: "4.13" | ||
overwrite: true | ||
parameters: | ||
-p ZONE=${{ env.ZONE }} -p NAME=${{ github.event.repository.name }} | ||
|
@@ -133,24 +135,26 @@ jobs: | |
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) | ||
- name: Deploy Database | ||
uses: bcgov-nr/[email protected].0 | ||
uses: bcgov-nr/[email protected].1 | ||
with: | ||
file: database/openshift.deploy.yml | ||
oc_namespace: ${{ secrets.OC_NAMESPACE }} | ||
oc_server: ${{ secrets.OC_SERVER }} | ||
oc_token: ${{ secrets.OC_TOKEN }} | ||
oc_version: "4.13" | ||
overwrite: false | ||
parameters: | ||
-p ZONE=${{ env.ZONE }} -p NAME=${{ github.event.repository.name }} | ||
-p PROMOTE=${{ github.repository }}/database:${{ env.ZONE }} | ||
|
||
- name: Deploy Legacy | ||
uses: bcgov-nr/[email protected].0 | ||
uses: bcgov-nr/[email protected].1 | ||
with: | ||
file: legacy/openshift.deploy.yml | ||
oc_namespace: ${{ secrets.OC_NAMESPACE }} | ||
oc_server: ${{ secrets.OC_SERVER }} | ||
oc_token: ${{ secrets.OC_TOKEN }} | ||
oc_version: "4.13" | ||
overwrite: true | ||
verification_path: health | ||
parameters: | ||
|
@@ -159,12 +163,13 @@ jobs: | |
-p ENVIRONMENT=${{ secrets.OC_NAMESPACE }} | ||
|
||
- name: Deploy Processor | ||
uses: bcgov-nr/[email protected].0 | ||
uses: bcgov-nr/[email protected].1 | ||
with: | ||
file: processor/openshift.deploy.yml | ||
oc_namespace: ${{ secrets.OC_NAMESPACE }} | ||
oc_server: ${{ secrets.OC_SERVER }} | ||
oc_token: ${{ secrets.OC_TOKEN }} | ||
oc_version: "4.13" | ||
overwrite: true | ||
verification_path: health | ||
parameters: | ||
|
@@ -173,23 +178,25 @@ jobs: | |
-p BCREGISTRY_URI='https://bcregistry-prod.apigee.net' | ||
|
||
- name: Deploy Backend ConfigMap | ||
uses: bcgov-nr/[email protected].0 | ||
uses: bcgov-nr/[email protected].1 | ||
with: | ||
file: backend/openshift.configmap.test.yml | ||
oc_namespace: ${{ secrets.OC_NAMESPACE }} | ||
oc_server: ${{ secrets.OC_SERVER }} | ||
oc_token: ${{ secrets.OC_TOKEN }} | ||
oc_version: "4.13" | ||
overwrite: true | ||
parameters: | ||
-p ZONE=${{ env.ZONE }} | ||
|
||
- name: Deploy Backend | ||
uses: bcgov-nr/[email protected].0 | ||
uses: bcgov-nr/[email protected].1 | ||
with: | ||
file: backend/openshift.deploy.yml | ||
oc_namespace: ${{ secrets.OC_NAMESPACE }} | ||
oc_server: ${{ secrets.OC_SERVER }} | ||
oc_token: ${{ secrets.OC_TOKEN }} | ||
oc_version: "4.13" | ||
overwrite: true | ||
verification_path: health | ||
parameters: | ||
|
@@ -202,33 +209,36 @@ jobs: | |
-p FRONTEND_URL=${{ env.URL }} | ||
|
||
- name: Dev data replacement | ||
uses: bcgov-nr/[email protected].0 | ||
uses: bcgov-nr/[email protected].1 | ||
with: | ||
file: database/openshift.dev.yml | ||
oc_namespace: ${{ secrets.OC_NAMESPACE }} | ||
oc_server: ${{ secrets.OC_SERVER }} | ||
oc_token: ${{ secrets.OC_TOKEN }} | ||
oc_version: "4.13" | ||
overwrite: true | ||
parameters: -p ZONE=${{ env.ZONE }} -p NAME=${{ github.event.repository.name }} | ||
|
||
- name: Deploy Frontend ConfigMap | ||
uses: bcgov-nr/[email protected].0 | ||
uses: bcgov-nr/[email protected].1 | ||
with: | ||
file: frontend/openshift.configmap.test.yml | ||
oc_namespace: ${{ secrets.OC_NAMESPACE }} | ||
oc_server: ${{ secrets.OC_SERVER }} | ||
oc_token: ${{ secrets.OC_TOKEN }} | ||
oc_version: "4.13" | ||
overwrite: true | ||
parameters: | ||
-p ZONE=${{ env.ZONE }} | ||
|
||
- name: Deploy Frontend | ||
uses: bcgov-nr/[email protected].0 | ||
uses: bcgov-nr/[email protected].1 | ||
with: | ||
file: frontend/openshift.deploy.yml | ||
oc_namespace: ${{ secrets.OC_NAMESPACE }} | ||
oc_server: ${{ secrets.OC_SERVER }} | ||
oc_token: ${{ secrets.OC_TOKEN }} | ||
oc_version: "4.13" | ||
overwrite: true | ||
parameters: | ||
-p ZONE=${{ env.ZONE }} -p NAME=${{ github.event.repository.name }} | ||
|
@@ -251,7 +261,7 @@ jobs: | |
images-prod: | ||
name: Promote images to PROD | ||
needs: [test-deploy] | ||
runs-on: ubuntu-22.04 | ||
runs-on: ubuntu-24.04 | ||
strategy: | ||
matrix: | ||
component: [backend, frontend, legacy, database, processor] | ||
|
@@ -270,16 +280,17 @@ jobs: | |
URL: forestclient.nrs.gov.bc.ca | ||
ZONE: prod | ||
environment: prod | ||
runs-on: ubuntu-22.04 | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Deploys | ||
uses: bcgov-nr/[email protected].0 | ||
uses: bcgov-nr/[email protected].1 | ||
with: | ||
file: common/openshift.init.yml | ||
oc_namespace: ${{ secrets.OC_NAMESPACE }} | ||
oc_server: ${{ secrets.OC_SERVER }} | ||
oc_token: ${{ secrets.OC_TOKEN }} | ||
oc_version: "4.13" | ||
overwrite: true | ||
parameters: | ||
-p ZONE=${{ env.ZONE }} -p NAME=${{ github.event.repository.name }} | ||
|
@@ -309,21 +320,27 @@ jobs: | |
ZONE: prod | ||
URL: forestclient.nrs.gov.bc.ca | ||
environment: prod | ||
runs-on: ubuntu-22.04 | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Deploy Database Backup | ||
uses: bcgov-nr/[email protected].0 | ||
uses: bcgov-nr/[email protected].1 | ||
with: | ||
file: database/openshift.backup.yml | ||
oc_namespace: ${{ secrets.OC_NAMESPACE }} | ||
oc_server: ${{ secrets.OC_SERVER }} | ||
oc_token: ${{ secrets.OC_TOKEN }} | ||
oc_version: "4.13" | ||
overwrite: true | ||
parameters: | ||
-p ZONE=${{ env.ZONE }} -p NAME=${{ github.event.repository.name }} | ||
-p PROMOTE=${{ github.repository }}/database:${{ env.PREV }} | ||
|
||
- name: Install CLI tools from OpenShift Mirror | ||
uses: redhat-actions/openshift-tools-installer@v1 | ||
with: | ||
oc: "4.13" | ||
|
||
- name: Backup database before update | ||
continue-on-error: true | ||
|
@@ -335,24 +352,26 @@ jobs: | |
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) | ||
- name: Deploy Database | ||
uses: bcgov-nr/[email protected].0 | ||
uses: bcgov-nr/[email protected].1 | ||
with: | ||
file: database/openshift.deploy.yml | ||
oc_namespace: ${{ secrets.OC_NAMESPACE }} | ||
oc_server: ${{ secrets.OC_SERVER }} | ||
oc_token: ${{ secrets.OC_TOKEN }} | ||
oc_version: "4.13" | ||
overwrite: false | ||
parameters: | ||
-p ZONE=${{ env.ZONE }} -p NAME=${{ github.event.repository.name }} | ||
-p PROMOTE=${{ github.repository }}/database:${{ env.PREV }} | ||
|
||
- name: Deploy Legacy | ||
uses: bcgov-nr/[email protected].0 | ||
uses: bcgov-nr/[email protected].1 | ||
with: | ||
file: legacy/openshift.deploy.yml | ||
oc_namespace: ${{ secrets.OC_NAMESPACE }} | ||
oc_server: ${{ secrets.OC_SERVER }} | ||
oc_token: ${{ secrets.OC_TOKEN }} | ||
oc_version: "4.13" | ||
overwrite: true | ||
verification_path: health | ||
parameters: | ||
|
@@ -361,12 +380,13 @@ jobs: | |
-p ENVIRONMENT=${{ secrets.OC_NAMESPACE }} | ||
|
||
- name: Deploy Processor | ||
uses: bcgov-nr/[email protected].0 | ||
uses: bcgov-nr/[email protected].1 | ||
with: | ||
file: processor/openshift.deploy.yml | ||
oc_namespace: ${{ secrets.OC_NAMESPACE }} | ||
oc_server: ${{ secrets.OC_SERVER }} | ||
oc_token: ${{ secrets.OC_TOKEN }} | ||
oc_version: "4.13" | ||
overwrite: true | ||
verification_path: health | ||
parameters: | ||
|
@@ -375,23 +395,25 @@ jobs: | |
-p BCREGISTRY_URI='https://bcregistry-prod.apigee.net' | ||
|
||
- name: Deploy Backend ConfigMap | ||
uses: bcgov-nr/[email protected].0 | ||
uses: bcgov-nr/[email protected].1 | ||
with: | ||
file: backend/openshift.configmap.prod.yml | ||
oc_namespace: ${{ secrets.OC_NAMESPACE }} | ||
oc_server: ${{ secrets.OC_SERVER }} | ||
oc_token: ${{ secrets.OC_TOKEN }} | ||
oc_version: "4.13" | ||
overwrite: true | ||
parameters: | ||
-p ZONE=${{ env.ZONE }} | ||
|
||
- name: Deploy Backend | ||
uses: bcgov-nr/[email protected].0 | ||
uses: bcgov-nr/[email protected].1 | ||
with: | ||
file: backend/openshift.deploy.yml | ||
oc_namespace: ${{ secrets.OC_NAMESPACE }} | ||
oc_server: ${{ secrets.OC_SERVER }} | ||
oc_token: ${{ secrets.OC_TOKEN }} | ||
oc_version: "4.13" | ||
overwrite: true | ||
verification_path: health | ||
parameters: | ||
|
@@ -404,23 +426,25 @@ jobs: | |
-p FRONTEND_URL=${{ env.URL }} | ||
|
||
- name: Deploy Frontend ConfigMap | ||
uses: bcgov-nr/[email protected].0 | ||
uses: bcgov-nr/[email protected].1 | ||
with: | ||
file: frontend/openshift.configmap.prod.yml | ||
oc_namespace: ${{ secrets.OC_NAMESPACE }} | ||
oc_server: ${{ secrets.OC_SERVER }} | ||
oc_token: ${{ secrets.OC_TOKEN }} | ||
oc_version: "4.13" | ||
overwrite: true | ||
parameters: | ||
-p ZONE=${{ env.ZONE }} | ||
|
||
- name: Deploy Frontend | ||
uses: bcgov-nr/[email protected].0 | ||
uses: bcgov-nr/[email protected].1 | ||
with: | ||
file: frontend/openshift.deploy.yml | ||
oc_namespace: ${{ secrets.OC_NAMESPACE }} | ||
oc_server: ${{ secrets.OC_SERVER }} | ||
oc_token: ${{ secrets.OC_TOKEN }} | ||
oc_version: "4.13" | ||
overwrite: true | ||
parameters: | ||
-p ZONE=${{ env.ZONE }} -p NAME=${{ github.event.repository.name }} | ||
|
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.