Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(deps): updating deployer and workflows #1185

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ jobs:
results:
name: Analysis Results
needs: [tests-java, tests-frontend, repo-reports]
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- run: echo "Workflow completed successfully!"
2 changes: 1 addition & 1 deletion .github/workflows/issue-gherkin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
create-feature:
if: contains(github.event.issue.labels.*.name, 'gherkin')
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- name: Checkout repository
Expand Down
76 changes: 50 additions & 26 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]
Expand All @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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 }}
Expand All @@ -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]
Expand All @@ -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 }}
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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 }}
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/pr-close.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,13 @@ jobs:
name: Cleanup tools environment
needs: [cleanup]
environment: tools
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Install CLI tools from OpenShift Mirror
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4.13"

- name: Remove the PR database
continue-on-error: true
run: |
Expand Down
Loading
Loading