-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tracking pull request to merge release-1.63.0 to master (#2305)
* ZEVA feat 2284 - reduction (#2312) * feat- removes code that automatically reduces transaction credits if deficit exists * chore: removes print statement/extra spaces * chore: removes duplication * Create post release pipeline (#2315) * Oct 21 2024 stuff - build-on-dev (#2227) * Updating terminology to reflect new policies (#2212) * Adding frontend flagging system for class 2B vehicles (#2213) * Task: Conditionally Render Vehicle Weight Class Text #2223 (#2235) * Conditionally render text for the vehicle class if it is an idir user. Removes 2B flag for everyone. * Adding in conditional rendering of vehicles supplied text for new model year reports * feat: 2233 - wording changes (#2239) * compliance reporting wording changes * more wording changes * more wording changes * make some wording changes conditional * 2256 Task: Update Compliance Ratios (#2285) * task: adds fixtures for updating compliance ratios and deleting unnecessary ones * chore: linting and adds comments * chore: removes compliance ratio fixture and replaces with migration, adds ordering into migration * update migration * Showing correct vehicle class based on weight (#2317) * small fix * Update Dockerfile-Openshift * small change * Update Dockerfile-Openshift * fix typo * fix: text change, removes 'active' from credit request upload page (#2318) * Oct 21 2024 stuff v1 (#2319) * -adds text that was removed accidently * -adds legacy ternary to vin request page/rejected vins, vehicle model list table -adds one day to legacy date * -adds word 'vehicle' in ternary for displaying text on supplier information --------- Co-authored-by: JulianForeman <[email protected]> Co-authored-by: Emily <[email protected]> Co-authored-by: Kuan Fan <[email protected]> * fix: 2273 - final(?) wording change (#2323) --------- Co-authored-by: Emily <[email protected]> Co-authored-by: tim738745 <[email protected]> Co-authored-by: JulianForeman <[email protected]>
- Loading branch information
1 parent
d5a2d91
commit 50f3437
Showing
73 changed files
with
897 additions
and
473 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,17 +1,13 @@ | ||
## For each release, the value of workflow name, branches and VERSION need to be adjusted accordingly | ||
|
||
name: Zeva new-pipeline-1.62.0 Dev CI | ||
name: Zeva new-pipeline Dev CI | ||
|
||
on: | ||
push: | ||
branches: [release-1.62.0] | ||
paths: | ||
- frontend/** | ||
- backend/** | ||
workflow_dispatch: | ||
pull_request: | ||
# Trigger only on PRs targeting the master branch | ||
branches: | ||
- master | ||
types: [opened, synchronize, reopened] | ||
|
||
env: | ||
VERSION: 1.62.0 | ||
GIT_URL: https://github.com/bcgov/zeva.git | ||
TOOLS_NAMESPACE: ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-tools | ||
DEV_NAMESPACE: ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-dev | ||
|
@@ -21,9 +17,26 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
jobs: | ||
verify-pr: | ||
name: Verify pull request title started with Tracking | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check PR Title | ||
id: check_pr_title | ||
run: | | ||
pr_title="${{ github.event.pull_request.title }}" | ||
echo "Pull Request Title: $pr_title" | ||
# Check if the title starts with "Tracking" | ||
if [[ "$pr_title" != Tracking* ]]; then | ||
echo "PR title does not start with 'Tracking'. Exiting..." | ||
exit 1 | ||
fi | ||
set-pre-release: | ||
name: Calculate pre-release number | ||
runs-on: ubuntu-latest | ||
needs: verify-pr | ||
|
||
outputs: | ||
output1: ${{ steps.set-pre-release.outputs.PRE_RELEASE }} | ||
|
@@ -33,14 +46,47 @@ jobs: | |
run: | | ||
echo "PRE_RELEASE=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT | ||
get-version: | ||
name: Get the version | ||
runs-on: ubuntu-latest | ||
needs: verify-pr | ||
|
||
outputs: | ||
output1: ${{ steps.get-version.outputs.VERSION }} | ||
|
||
steps: | ||
- id: get-version | ||
run: | | ||
echo "VERSION=$(echo "${{ github.event.pull_request.head.ref }}" | grep -oP '\d+\.\d+\.\d+')" >> $GITHUB_OUTPUT | ||
verify-build-suffix: | ||
name: Verify-build-suffix | ||
runs-on: ubuntu-latest | ||
needs: [set-pre-release,get-version] | ||
|
||
env: | ||
BUILD_SUFFIX: ${{ needs.get-version.outputs.output1 }}-${{ needs.set-pre-release.outputs.output1 }} | ||
|
||
steps: | ||
- id: verify-build-suffix | ||
run: | | ||
echo "Validating ${{ env.BUILD_SUFFIX }}" | ||
if [[ "${{ env.BUILD_SUFFIX }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+-[0-9]{14}$ ]]; then | ||
echo "Build suffix ${{ env.BUILD_SUFFIX }} format is valid." | ||
else | ||
echo "Error: Build suffix ${{ env.BUILD_SUFFIX }} format is invalid!" | ||
exit 1 | ||
fi | ||
build-backend: | ||
name: Build Zeva Backend | ||
runs-on: ubuntu-latest | ||
needs: set-pre-release | ||
needs: [set-pre-release,get-version,verify-build-suffix] | ||
timeout-minutes: 60 | ||
|
||
env: | ||
PRE_RELEASE: ${{ needs.set-pre-release.outputs.output1 }} | ||
VERSION: ${{ needs.get-version.outputs.output1 }} | ||
|
||
steps: | ||
- name: Check out repository | ||
|
@@ -56,6 +102,8 @@ jobs: | |
|
||
- name: Build Zeva Backend | ||
run: | | ||
echo ${{ env.PRE_RELEASE }} | ||
echo ${{ env.VERSION }} | ||
cd openshift/templates/backend | ||
oc process -f ./backend-bc-docker.yaml NAME=zeva SUFFIX=-${{ env.VERSION }}-${{ env.PRE_RELEASE }} VERSION=${{ env.VERSION }}-${{ env.PRE_RELEASE }} GIT_URL=${{ env.GIT_URL }} GIT_REF=release-${{ env.VERSION }} | oc apply --wait=true -f - -n ${{ env.TOOLS_NAMESPACE }} | ||
sleep 2s | ||
|
@@ -71,11 +119,12 @@ jobs: | |
build-frontend: | ||
name: Build Zeva Frontend | ||
runs-on: ubuntu-latest | ||
needs: set-pre-release | ||
needs: [set-pre-release,get-version,verify-build-suffix] | ||
timeout-minutes: 60 | ||
|
||
env: | ||
PRE_RELEASE: ${{ needs.set-pre-release.outputs.output1 }} | ||
VERSION: ${{ needs.get-version.outputs.output1 }} | ||
|
||
steps: | ||
- name: Check out repository | ||
|
@@ -107,10 +156,11 @@ jobs: | |
name: Deploy Zeva on Dev | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
needs: [set-pre-release, build-backend, build-frontend] | ||
needs: [set-pre-release,get-version,build-backend, build-frontend] | ||
|
||
env: | ||
PRE_RELEASE: ${{ needs.set-pre-release.outputs.output1 }} | ||
VERSION: ${{ needs.get-version.outputs.output1 }} | ||
|
||
steps: | ||
- name: Checkout Manifest repository | ||
|
@@ -128,6 +178,7 @@ jobs: | |
yq -i '.backend.image.tag = "${{ env.VERSION }}-${{ env.PRE_RELEASE }}"' zeva/values-dev.yaml | ||
- name: GitHub Commit & Push | ||
shell: bash {0} | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "GitHub Actions" | ||
|
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 |
---|---|---|
|
@@ -85,7 +85,7 @@ jobs: | |
uses: trstringer/[email protected] | ||
with: | ||
secret: ${{ github.TOKEN }} | ||
approvers: AlexZorkin,emi-hi,tim738745,kuanfandevops,jig-patel,prv-proton | ||
approvers: emi-hi,tim738745,kuanfandevops,ArawuSamuel1,JulianForeman,katerinkus,rogerlcleung,katerinkus | ||
minimum-approvals: 1 | ||
issue-title: "ZEVA ${{ env.VERSION }} Test Deployment" | ||
|
||
|
@@ -145,7 +145,7 @@ jobs: | |
uses: trstringer/[email protected] | ||
with: | ||
secret: ${{ github.TOKEN }} | ||
approvers: AlexZorkin,kuanfandevops,tim738745,emi-hi | ||
approvers: emi-hi,tim738745,kuanfandevops,ArawuSamuel1,JulianForeman,katerinkus,rogerlcleung,katerinkus | ||
minimum-approvals: 1 | ||
issue-title: "ZEVA ${{ env.VERSION }} Prod Deployment" | ||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,110 @@ | ||
name: Post Release Work | ||
|
||
on: | ||
pull_request: | ||
# Trigger only on PRs targeting the master branch | ||
branches: | ||
- master | ||
types: [closed] | ||
|
||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
|
||
jobs: | ||
verify-pr: | ||
name: Verify pull request title started with Tracking | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check PR Title | ||
id: check_pr_title | ||
run: | | ||
if [ "${{ github.event.pull_request.merged }}" = "true" ]; then | ||
echo "The pull request was merged." | ||
else | ||
echo "The pull request was closed without merging." | ||
exit 1 | ||
fi | ||
pr_title="${{ github.event.pull_request.title }}" | ||
echo "Pull Request Title: $pr_title" | ||
# Check if the title starts with "Tracking" | ||
if [[ "$pr_title" != Tracking* ]]; then | ||
echo "PR title does not start with 'Tracking'. Exiting..." | ||
exit 1 | ||
fi | ||
post-release-work: | ||
runs-on: ubuntu-latest | ||
needs: verify-pr | ||
steps: | ||
- name: Find tag name | ||
uses: mad9000/actions-find-and-replace-string@5 | ||
id: tag_name | ||
with: | ||
source: ${{ github.event.pull_request.head.ref }} | ||
find: 'release-' | ||
replace: 'v' | ||
|
||
- name: Create Release | ||
uses: softprops/[email protected] | ||
with: | ||
name: ${{ steps.tag_name.outputs.value }} | ||
tag_name: ${{ steps.tag_name.outputs.value }} | ||
target_commitish: master | ||
body: | | ||
${{ github.event.pull_request.body }} | ||
token: ${{ env.GITHUB_TOKEN }} | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Get Current Default Branch and Set Tag Name | ||
id: get_default_branch | ||
run: | | ||
# Fetch the current default branch using the GitHub API | ||
current_default_branch=$(gh api repos/${{ github.repository }} | jq -r '.default_branch') | ||
echo "Current default branch is: $current_default_branch" | ||
echo "current_default_branch=$current_default_branch" >> $GITHUB_OUTPUT | ||
# # Extract the current release version number (assumes format is release-X.Y.Z) | ||
# current_version=$(echo "$current_default_branch" | grep -oP '\d+\.\d+\.\d+') | ||
# echo "Current version extracted: $current_version" | ||
# # Create tag in the format vX.Y.Z | ||
# tag_name="v$current_version" | ||
# echo "Generated tag name: $tag_name" | ||
- name: Get New Release Branch | ||
id: get_new_release_branch | ||
run: | | ||
# Get the current default branch from the previous step | ||
current_default_branch="${{ steps.get_default_branch.outputs.current_default_branch }}" | ||
# Extract the current release version number (assumes format is release-X.Y.Z) | ||
current_version=$(echo "$current_default_branch" | grep -oP '\d+\.\d+\.\d+') | ||
# Increment the minor version (X.Y.Z -> X.(Y+1).0) | ||
major_version=$(echo "$current_version" | cut -d. -f1) | ||
minor_version=$(echo "$current_version" | cut -d. -f2) | ||
patch_version=$(echo "$current_version" | cut -d. -f3) | ||
# Increment the minor version by 1 for the new release branch | ||
new_minor_version=$((minor_version + 1)) | ||
new_release_branch="release-${major_version}.${new_minor_version}.0" | ||
echo "New release branch will be: $new_release_branch" | ||
echo "new_release_branch=$new_release_branch" >> $GITHUB_OUTPUT | ||
- name: Checkout repository | ||
uses: actions/[email protected] | ||
with: | ||
ref: master | ||
|
||
- name: Create New Release Branch | ||
id: create_new_release_branch | ||
run: | | ||
# Get the new release branch name from the previous step | ||
new_release_branch="${{ steps.get_new_release_branch.outputs.new_release_branch }}" | ||
# Create the new branch from master | ||
git checkout -b $new_release_branch master | ||
git push origin $new_release_branch |
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.