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

Tracking pull request to merge release-1.65.0 to master #2358

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
11b8caa
Update package.json 1.65.0 (#2357)
kuanfandevops Nov 19, 2024
65783b6
updat readme
kuanfandevops Nov 19, 2024
ecbd2a2
echo OPENSHIFT_SERVER
kuanfandevops Nov 20, 2024
dacae68
pr build fix
kuanfandevops Nov 20, 2024
7094926
add tmp test
kuanfandevops Nov 20, 2024
955f9a8
add tmp test
kuanfandevops Nov 20, 2024
2613efc
add tmp test
kuanfandevops Nov 20, 2024
a360cfd
add tmp test
kuanfandevops Nov 20, 2024
5227c0f
add tmp test
kuanfandevops Nov 20, 2024
34055af
add pull-request-build.yaml
kuanfandevops Nov 20, 2024
afb051e
add pull-request-build.yaml
kuanfandevops Nov 20, 2024
d5a7bad
add pull-request-build.yaml
kuanfandevops Nov 20, 2024
2b767cc
update pr build
kuanfandevops Nov 20, 2024
340b1bf
update pr build
kuanfandevops Nov 20, 2024
8ebd40b
update pr build
kuanfandevops Nov 20, 2024
91edea1
fix: convert carry over deficits (#2360)
emi-hi Nov 21, 2024
59a38a0
fix: adds check for comments before rendering div with outline so the…
emi-hi Nov 21, 2024
e0864a6
2292 unit-tests: Compliance Obligation Container (#2367)
rogerlcleung Nov 26, 2024
b2e7787
feat: adds separation between sales/suppled on vehicle supplier infor…
emi-hi Dec 2, 2024
163b425
feat: 2364 - add tooltips (#2368)
tim738745 Dec 2, 2024
32ea4af
1732, 1734 - Unit-tests for Compliance and Compliance/components (#2372)
rogerlcleung Dec 6, 2024
89f37aa
fix: 2362 - deficits (#2371)
tim738745 Dec 6, 2024
23a0404
Update readme.md
kuanfandevops Dec 11, 2024
4d7cb3c
fix: replaces reportYear with modelYear so page can load properly (un…
emi-hi Dec 11, 2024
135ba9a
install oc command in pipelines
kuanfandevops Dec 17, 2024
e65828f
Merge branch 'master' into release-1.65.0
kuanfandevops Dec 18, 2024
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
61 changes: 15 additions & 46 deletions .github/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,61 +9,30 @@

Notes: the change may take about 20 minutes to be promoted to Zeva development environment on Openshift

## Add the build-on-dev to the end of pull request's title

The "Build PR on Dev" pipeline will be triggered when it identified pull request's title ends with "build-on-dev"

# Production release
# Pipelines

## Pre-production release
## Primary Pipelines

- Update the description of the tracking pull request
- Verify the changes made during the previous post production release
- dev-ci.yaml: Build the tracking pull request and delpoy on Dev
- test-ci.yaml: Tag the running images on Dev to Test and delpoy on Test
- prod-ci.yaml: Tag the running images on Test to Test and delpoy on Prod

## Production release
## Other Pipelines

- Manually trigger the pipeline release-build.yaml (Release Build 1.49.0)
- cleanup-cron-workflow-runs.yaml (Scheduled cleanup old workflow runs): a cron job running periodically to cleanup old workflow runs
- cleanup-workflow-runs.yaml (Cleanup old workflow runs): manually cleanup the workflow runs
- emergency-release-build.yaml (Emergency Release Build 1.47.1): the pipeline built for emergency release 1.47.1

## Post production release
# Post production release

### Merge the tracking pull request and create the new release branch
## Merge the tracking pull request and create the new release branch

- Squash merge the tracking pull request to master
- Squash and merge the tracking pull request to master
- Create the release on GitHub from master branch
- Create the new release branch from master branch (this is done automatically by pipeline create-release.yaml)
- Change the new release branch as the default branch in the repo and update the branch protection rules https://github.com/bcgov/zeva/settings/branches

### Updates for the new release branch
## Updates for the new release branch

- dev-build.yaml
- on -> push -> branches
- env -> PR_NUMBER
- env -> VERSION
- jobs -> call-unit-test -> with -> pr-number
- Update frontend/package.json version and create the new tracking pull request
- Update release-build.yaml
- name
- env -> PR_NUMBER
- env -> VERSION
- jobs -> call-unit-test -> with -> pr-numb
- Create the trackings pull request to merge the new release branch to master. Update the abour PR_NUMBER after the trackings pull request is created.

# Pipelines

## Primary Pipelines

- build-on-dev.yaml (Build PR on Dev): Build pull request if the string build-on-dev is appended at the end of pull request title
- dev-build.yaml (Dev Build 1.49.0): Every commit on the current release branch is automatically released to Dev.
- release-build.yaml (Release Build 1.49.0): This is a manually managed pipeline. It needs to be triggered manually to build the current release branch and deploy on Test and further on Prod.
- create-release.yaml (Create Release after merging to master): Automatically tag and create the release after merging release branch to master. The description of the tracking pull request becomes release notes.

## Other Pipelines

- cleanup-cron-workflow-runs.yaml (Scheduled cleanup old workflow runs): a cron job running periodically to cleanup old workflow runs
- cleanup-workflow-runs.yaml (Cleanup old workflow runs): manually cleanup the workflow runs
- emergency-release-build.yaml (Emergency Release Build 1.47.1): the pipeline built for emergency release 1.47.1
- pr-build-template.yaml (PR Build Template): a pipeline template for pull request build
- pr-lable.yaml (Label PR): ignore this one for now, it is automatically triggered after the pull request is merged or closed
- pr-teardown.yaml (Teardown PR on Dev): remove the deployed pull request on Dev
- release-build.yaml (Release Build 1.49.0): a pipeline to build release branch
- unit-test-template.yaml (Unit Test Template): a pipeline template for unit test
- Update frontend/package.json version in the new release branch
- Create the new tracking pull request to merge the nre release branch to master
46 changes: 46 additions & 0 deletions .github/workflows/dev-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,37 @@ concurrency:
cancel-in-progress: true

jobs:

install-oc:
runs-on: ubuntu-latest
outputs:
cache-hit: ${{ steps.cache.outputs.cache-hit }}
steps:
- name: Check out repository
uses: actions/[email protected]

- name: Set up cache for OpenShift CLI
id: cache
uses: actions/[email protected]
with:
path: /usr/local/bin/oc # Path where the `oc` binary will be installed
key: oc-cli-${{ runner.os }}

- name: Install OpenShift CLI (if not cached)
if: steps.cache.outputs.cache-hit != 'true'
run: |
curl -LO https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/openshift-client-linux.tar.gz
tar -xvf openshift-client-linux.tar.gz
sudo mv oc /usr/local/bin/
oc version --client

- name: Confirm OpenShift CLI is Available
run: oc version --client

verify-pr:
name: Verify pull request title started with Tracking
runs-on: ubuntu-latest
needs: [install-oc]
steps:
- name: Check PR Title
id: check_pr_title
Expand Down Expand Up @@ -92,6 +120,12 @@ jobs:
- name: Check out repository
uses: actions/[email protected]

- name: Restore oc command from Cache
uses: actions/[email protected]
with:
path: /usr/local/bin/oc
key: oc-cli-${{ runner.os }}

- name: Log in to Openshift
uses: redhat-actions/[email protected]
with:
Expand Down Expand Up @@ -130,6 +164,12 @@ jobs:
- name: Check out repository
uses: actions/[email protected]

- name: Restore oc command from Cache
uses: actions/[email protected]
with:
path: /usr/local/bin/oc
key: oc-cli-${{ runner.os }}

- name: Log in to Openshift
uses: redhat-actions/[email protected]
with:
Expand Down Expand Up @@ -186,6 +226,12 @@ jobs:
git commit -m "Update the image tag to ${{ env.VERSION }}-${{ env.PRE_RELEASE }} on Dev"
git push

- name: Restore oc command from Cache
uses: actions/[email protected]
with:
path: /usr/local/bin/oc
key: oc-cli-${{ runner.os }}

- name: Log in to Openshift
uses: redhat-actions/[email protected]
with:
Expand Down
61 changes: 61 additions & 0 deletions .github/workflows/pr-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: PR Build on Dev
on:
pull_request:
types: [labeled, synchronize]
branches:
- release-1.65.0
paths:
- frontend/**
- backend/**
Expand All @@ -19,17 +21,58 @@ concurrency:
cancel-in-progress: true

jobs:
install-oc:
runs-on: ubuntu-latest
outputs:
cache-hit: ${{ steps.cache.outputs.cache-hit }}
steps:
- name: Check out repository
uses: actions/[email protected]

- name: Set up cache for OpenShift CLI
id: cache
uses: actions/[email protected]
with:
path: /usr/local/bin/oc # Path where the `oc` binary will be installed
key: oc-cli-${{ runner.os }}

- name: Install OpenShift CLI (if not cached)
if: steps.cache.outputs.cache-hit != 'true'
run: |
curl -LO https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/openshift-client-linux.tar.gz
tar -xvf openshift-client-linux.tar.gz
sudo mv oc /usr/local/bin/
oc version --client

- name: Confirm OpenShift CLI is Available
run: oc version --client

get-version:
if: >
(github.event.action == 'labeled' && github.event.label.name == 'build' && github.event.pull_request.base.ref == github.event.repository.default_branch) ||
(github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'build') && github.event.pull_request.base.ref == github.event.repository.default_branch)
name: Retrieve version
runs-on: ubuntu-latest
needs: [install-oc]

outputs:
output1: ${{ steps.get-version.outputs.VERSION }}

steps:
- name: show
run: |
echo ${{ env.GIT_URL }}
echo ${{ env.TOOLS_NAMESPACE }}
echo ${{ env.DEV_NAMESPACE }}
echo ${{ env.PR_NUMBER }}
echo ${{ env.GIT_REF }}

- name: Restore oc command from Cache
uses: actions/[email protected]
with:
path: /usr/local/bin/oc
key: oc-cli-${{ runner.os }}

- name: Log in to Openshift
uses: redhat-actions/[email protected]
with:
Expand Down Expand Up @@ -68,6 +111,12 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.ref }}

- name: Restore oc command from Cache
uses: actions/[email protected]
with:
path: /usr/local/bin/oc
key: oc-cli-${{ runner.os }}

- name: Log in to Openshift
uses: redhat-actions/[email protected]
with:
Expand Down Expand Up @@ -108,6 +157,12 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.ref }}

- name: Restore oc command from Cache
uses: actions/[email protected]
with:
path: /usr/local/bin/oc
key: oc-cli-${{ runner.os }}

- name: Log in to Openshift
uses: redhat-actions/[email protected]
with:
Expand Down Expand Up @@ -165,6 +220,12 @@ jobs:
replace: "${{ env.PR_NUMBER }}"
include: "zeva/values-dev-pr.yaml"
regex: false

- name: Restore oc command from Cache
uses: actions/[email protected]
with:
path: /usr/local/bin/oc
key: oc-cli-${{ runner.os }}

- name: Log in to Openshift
uses: redhat-actions/[email protected]
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/pr-teardown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,48 @@ concurrency:
cancel-in-progress: true

jobs:
install-oc:
runs-on: ubuntu-latest
outputs:
cache-hit: ${{ steps.cache.outputs.cache-hit }}
steps:
- name: Check out repository
uses: actions/[email protected]

- name: Set up cache for OpenShift CLI
id: cache
uses: actions/[email protected]
with:
path: /usr/local/bin/oc # Path where the `oc` binary will be installed
key: oc-cli-${{ runner.os }}

- name: Install OpenShift CLI (if not cached)
if: steps.cache.outputs.cache-hit != 'true'
run: |
curl -LO https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/openshift-client-linux.tar.gz
tar -xvf openshift-client-linux.tar.gz
sudo mv oc /usr/local/bin/
oc version --client

- name: Confirm OpenShift CLI is Available
run: oc version --client

teardown:
if: >
(github.event.action == 'unlabeled' && github.event.label.name == 'build') ||
(github.event.action == 'closed' && contains(github.event.pull_request.labels.*.name, 'build') )
name: PR Teardown
runs-on: ubuntu-latest
timeout-minutes: 60
needs: [install-oc]

steps:
- name: Restore oc command from Cache
uses: actions/[email protected]
with:
path: /usr/local/bin/oc
key: oc-cli-${{ runner.os }}

- name: Log in to Openshift
uses: redhat-actions/[email protected]
with:
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/prod-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,47 @@ concurrency:
cancel-in-progress: true

jobs:
install-oc:
runs-on: ubuntu-latest
outputs:
cache-hit: ${{ steps.cache.outputs.cache-hit }}
steps:
- name: Check out repository
uses: actions/[email protected]

- name: Set up cache for OpenShift CLI
id: cache
uses: actions/[email protected]
with:
path: /usr/local/bin/oc # Path where the `oc` binary will be installed
key: oc-cli-${{ runner.os }}

- name: Install OpenShift CLI (if not cached)
if: steps.cache.outputs.cache-hit != 'true'
run: |
curl -LO https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/openshift-client-linux.tar.gz
tar -xvf openshift-client-linux.tar.gz
sudo mv oc /usr/local/bin/
oc version --client

- name: Confirm OpenShift CLI is Available
run: oc version --client

get-build-suffix:
name: Find Test deployment build suffix
runs-on: ubuntu-latest
needs: [install-oc]

outputs:
output1: ${{ steps.get-build-suffix.outputs.BUILD_SUFFIX }}

steps:
- name: Restore oc command from Cache
uses: actions/[email protected]
with:
path: /usr/local/bin/oc
key: oc-cli-${{ runner.os }}

- name: Log in to Openshift
uses: redhat-actions/[email protected]
with:
Expand Down Expand Up @@ -61,6 +94,12 @@ jobs:
minimum-approvals: 2
issue-title: "ZEVA ${{ env.BUILD_SUFFIX }} Prod Deployment"

- name: Restore oc command from Cache
uses: actions/[email protected]
with:
path: /usr/local/bin/oc
key: oc-cli-${{ runner.os }}

- name: Log in to Openshift
uses: redhat-actions/[email protected]
with:
Expand Down
Loading
Loading