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

feat: CE-906 merge main updates #552

Merged
merged 2 commits into from
Jul 19, 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
68 changes: 68 additions & 0 deletions .github/workflows/merge-hotfix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Deploys hotfixes to the test environment
name: Merge-Hotfix

on:
push:
branches: [hotfix]
paths-ignore:
- "*.md"
- ".github/**"
- ".github/graphics/**"
- "!.github/workflows/**"
workflow_dispatch:
inputs:
pr_no:
description: "PR-numbered container set to deploy"
type: number
required: true

concurrency:
# Do not interrupt previous workflows
group: ${{ github.workflow }}
cancel-in-progress: false

jobs:
vars:
name: Set Variables
outputs:
pr: ${{ steps.pr.outputs.pr }}
runs-on: ubuntu-22.04
timeout-minutes: 1
steps:
- uses: actions/checkout@v4
# Get PR number for squash merges to release
- name: PR Number
id: pr
uses: ./.github/actions/get-pr-number
- name: Set PR Output
run: echo "pr=${{ steps.pr.outputs.pr }}" >> $GITHUB_OUTPUT

# https://github.com/bcgov/quickstart-openshift-helpers
deploy-hotfix:
name: Deploy (hotfix)
needs: vars
uses: bcgov/quickstart-openshift-helpers/.github/workflows/[email protected]
secrets:
oc_namespace: ${{ secrets.OC_NAMESPACE }}
oc_token: ${{ secrets.OC_TOKEN }}
with:
environment: hotfix
tag: ${{ needs.vars.outputs.pr }}

promote:
name: Promote Images
needs: [deploy-hotfix, vars]
runs-on: ubuntu-22.04
permissions:
packages: write
strategy:
matrix:
package: [migrations, backend, frontend, webeoc]
timeout-minutes: 1
steps:
- uses: shrink/actions-docker-registry-tag@v4
with:
registry: ghcr.io
repository: ${{ github.repository }}/${{ matrix.package }}
target: ${{ needs.vars.outputs.pr }}
tags: hotfix
10 changes: 7 additions & 3 deletions .github/workflows/merge-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,25 @@ jobs:
runs-on: ubuntu-22.04
timeout-minutes: 1
steps:
# Get PR number for squash merges to main
- uses: actions/checkout@v4
# Get PR number for squash merges to release
- name: PR Number
id: pr
uses: bcgov-nr/[email protected]
uses: ./.github/actions/get-pr-number
- name: Set PR Output
run: echo "pr=${{ steps.pr.outputs.pr }}" >> $GITHUB_OUTPUT

# https://github.com/bcgov/quickstart-openshift-helpers
deploy-prod:
name: Deploy (prod)
needs: [deploy-test, vars]
needs: [vars]
uses: bcgov/quickstart-openshift-helpers/.github/workflows/[email protected]
secrets:
oc_namespace: ${{ secrets.OC_NAMESPACE }}
oc_token: ${{ secrets.OC_TOKEN }}
with:
environment: prod
tag: ${{ needs.vars.outputs.pr }}
params: --set backend.deploymentStrategy=RollingUpdate
--set frontend.deploymentStrategy=RollingUpdate
--set global.autoscaling=true
Expand Down
Loading