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-2.22.0 to master #2913

Merged
merged 68 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
cf3faf3
initial updates 2.20.0
kuanfandevops Jun 11, 2024
486c50e
update pr number
kuanfandevops Jun 11, 2024
a787ad6
fix: fix for total previous credit reductions (#2902)
AlexZorkin Aug 12, 2024
1219857
update pip to 24.0 as celery build failed
kuanfandevops Aug 13, 2024
1bbf30d
update pip to 24.0 as scanhandler failed
kuanfandevops Aug 13, 2024
f310a6d
Fix: Pending Deductions Logic for Previously Submitted Reports (#2904)
AlexZorkin Aug 30, 2024
f4fd05e
update approvers
kuanfandevops Sep 4, 2024
b499a13
initial updates for 2.22.0
kuanfandevops Oct 8, 2024
013c8b3
update pr number
kuanfandevops Oct 8, 2024
c0d43be
add knp to allow lcfs backend to access tfrs rabbit
kuanfandevops Oct 30, 2024
6218638
update the diagram to allow lcfs backend to access tfrs rabbit
kuanfandevops Oct 30, 2024
676b4e7
udpate rabbitmq dev knp
kuanfandevops Oct 31, 2024
ec0e42b
update comment in knp
kuanfandevops Nov 1, 2024
48fb584
feat: implement TFRS teardown for BCeID and IDIR users
hamed-valiollahi Nov 5, 2024
c95ef6b
chore: Merge branch 'release-2.22.0' into feat/hamed-tfrs-teardown-bc…
hamed-valiollahi Nov 5, 2024
8a246b9
add redis settings for backend
kuanfandevops Nov 7, 2024
f8194ca
add REDIS arguments
kuanfandevops Nov 7, 2024
e329210
correct typo
kuanfandevops Nov 7, 2024
c06c470
Merge pull request #2918 from bcgov/feat/hamed-tfrs-teardown-bceid-id…
hamed-valiollahi Nov 8, 2024
fc44c81
TFRS - Credit transfer incorrectly categorized in TFRS #2916 (#2917)
prv-proton Nov 12, 2024
9e3b665
Add changes for new pipeline (#2921)
kuanfandevops Nov 13, 2024
371a81e
New pipeline and replace deployment config (#2924)
kuanfandevops Nov 13, 2024
7cc9118
New pipeline 2.22.0 (#2925)
kuanfandevops Nov 15, 2024
61ec565
update deployment name
kuanfandevops Nov 15, 2024
7bec225
test deployonly
kuanfandevops Nov 15, 2024
bdef62c
open all builds
kuanfandevops Nov 15, 2024
b371aca
combine build
kuanfandevops Nov 15, 2024
7ad08e9
replace dc with d on Test
kuanfandevops Nov 19, 2024
ab9addf
update test pipeline name
kuanfandevops Nov 19, 2024
4ef447f
move test-ci-dc-2-d.yaml to release-2.21.0
kuanfandevops Nov 19, 2024
39ae7d0
add test-ci
kuanfandevops Nov 21, 2024
8b49a57
update test-ci suffix validation
kuanfandevops Nov 21, 2024
5e71b57
update dev-ci
kuanfandevops Nov 21, 2024
7add37d
update prod release pipeline
kuanfandevops Nov 22, 2024
c7653da
add new prod pipeline
kuanfandevops Nov 22, 2024
79e8e7e
Feat: TFRS: Add Redis Service for organization balance (#2919)
prv-proton Dec 6, 2024
e7f429e
feat: lcfs transaction message on director transaction (#2920)
AlexZorkin Dec 6, 2024
2c0941e
fix: Convert Decimal to int
dhaselhan Dec 12, 2024
53668dd
use artifactory pull secret
kuanfandevops Dec 13, 2024
df743f4
use artifactory pull secret
kuanfandevops Dec 13, 2024
ce50f52
update artifactory pull secret
kuanfandevops Dec 13, 2024
a623b8e
Merge pull request #2933 from bcgov/fix/daniel-fix-int-rounding-1414
dhaselhan Dec 16, 2024
40bed3d
feat: Sync Reports TFRS -> LCFS
dhaselhan Dec 16, 2024
0133916
install oc command
kuanfandevops Dec 16, 2024
dfc1602
add install-oc.sh
kuanfandevops Dec 16, 2024
2e76f9f
add install-oc.sh
kuanfandevops Dec 16, 2024
89fb630
remove install-oc
kuanfandevops Dec 16, 2024
6040e1f
update test-ci
kuanfandevops Dec 16, 2024
4e05ec3
update pipeline title
kuanfandevops Dec 16, 2024
261718b
update approval title
kuanfandevops Dec 16, 2024
f3adbbd
add approval step
kuanfandevops Dec 16, 2024
3605235
restore oc command from cache
kuanfandevops Dec 16, 2024
825e330
update issue title
kuanfandevops Dec 16, 2024
5828db8
move approval steps
kuanfandevops Dec 16, 2024
80bebb9
Merge pull request #2934 from bcgov/feat/daniel-sync-compliance-reports
dhaselhan Dec 17, 2024
22670cb
update dev and test ci
kuanfandevops Dec 18, 2024
a99c8eb
update dev-ci
kuanfandevops Dec 18, 2024
5b5c77b
reorg test-ci
kuanfandevops Dec 18, 2024
4104d13
uncomment deployment
kuanfandevops Dec 18, 2024
79206de
reorg pro-ci
kuanfandevops Dec 18, 2024
7944c83
reorg pro-ci
kuanfandevops Dec 18, 2024
766061c
test pro-ci after ubuntu image change
kuanfandevops Dec 18, 2024
66e189f
open the prod deployment
kuanfandevops Dec 18, 2024
4cc8c91
set approval to 2
kuanfandevops Dec 18, 2024
8296aa9
feat: supplemental variables (#2945)
AlexZorkin Dec 24, 2024
93ff48f
feat: enable tear-down feature flags for dev testing (#2946)
hamed-valiollahi Dec 24, 2024
2b60074
update frontend node to 20.18.1
kuanfandevops Jan 8, 2025
5685aec
fix: resolve issue with tear_down.idir.widgets.balance flag (#2948)
hamed-valiollahi Jan 21, 2025
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
398 changes: 398 additions & 0 deletions .github/workflows/dev-ci.yaml

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions .github/workflows/dev-release.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
## For each release, the value of name, branches, RELEASE_NAME and PR_NUMBER need to be adjusted accordingly
## For each release, update lib/config.js: version and releaseBranch

name: TFRS Dev release-2.21.0
name: TFRS Dev release-2.22.0

on:
push:
branches: [release-2.21.0]
branches: [release-2.22.0]
paths:
- frontend/**
- backend/**
Expand All @@ -15,8 +15,8 @@ on:
env:
## The pull request number of the Tracking pull request to merge the release branch to main
## Also remember to update the version in .pipeline/lib/config.js
PR_NUMBER: 2908
RELEASE_NAME: release-2.21.0
PR_NUMBER: 2913
RELEASE_NAME: release-2.22.0

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
164 changes: 164 additions & 0 deletions .github/workflows/prod-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
name: TFRS New Pipeline Prod release-2.22.0

on:
workflow_dispatch:

env:
GIT_URL: https://github.com/bcgov/tfrs.git
TEST_NAMESPACE: ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-test
PROD_NAMESPACE: ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-prod

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:

install-oc:
runs-on: ubuntu-latest
outputs:
cache-hit: ${{ steps.cache.outputs.cache-hit }}
steps:
- 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:
BUILD_SUFFIX: ${{ 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:
openshift_server_url: ${{ secrets.OPENSHIFT_SERVER }}
openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
insecure_skip_tls_verify: true
namespace: ${{ env.TEST_NAMESPACE }}

- id: get-build-suffix
run: |
build_suffix=$(oc -n ${{ env.TEST_NAMESPACE }} describe deployment/tfrs-frontend-test | grep Image | awk -F ':' '{print $NF}')
echo "Validating $build_suffix"
if [[ "$build_suffix" =~ ^[0-9]+\.[0-9]+\.[0-9]$ ]]; then
echo "Build suffix $build_suffix format is valid."
echo "BUILD_SUFFIX=$build_suffix" >> $GITHUB_OUTPUT
else
echo "Error: Build suffix $build_suffix format is invalid!"
exit 1
fi

deploy:
name: Deploy on Prod
runs-on: ubuntu-latest
timeout-minutes: 60
needs: [get-build-suffix]

env:
BUILD_SUFFIX: ${{ needs.get-build-suffix.outputs.BUILD_SUFFIX }}

steps:
- id: get-current-time
run: |
echo "CURRENT_TIME=$(TZ='America/Vancouver' date '+%Y-%m-%d %H:%M:%S %Z')" >> $GITHUB_OUTPUT

- name: Ask for approval for TFRS Prod deployment
uses: trstringer/[email protected]
with:
secret: ${{ github.TOKEN }}
approvers: AlexZorkin,kuanfandevops,prv-proton,JulianForeman,kevin-hashimoto,dhaselhan
minimum-approvals: 2
issue-title: "TFRS ${{ env.BUILD_SUFFIX }} Prod Deployment at ${{ steps.get-current-time.outputs.CURRENT_TIME }}"

- name: Checkout Manifest repository
uses: actions/[email protected]
with:
repository: bcgov-c/tenant-gitops-0ab226
ref: main
ssh-key: ${{ secrets.MANIFEST_REPO_DEPLOY_KEY }}

- name: Update tags
uses: mikefarah/[email protected]
with:
cmd: |
yq -i '.image.tag = "${{ env.BUILD_SUFFIX }}"' tfrs/charts/backend/values-prod.yaml
yq -i '.image.tag = "${{ env.BUILD_SUFFIX }}"' tfrs/charts/frontend/values-prod.yaml
yq -i '.image.tag = "${{ env.BUILD_SUFFIX }}"' tfrs/charts/notification-server/values-prod.yaml
yq -i '.image.tag = "${{ env.BUILD_SUFFIX }}"' tfrs/charts/celery/values-prod.yaml
yq -i '.image.tag = "${{ env.BUILD_SUFFIX }}"' tfrs/charts/scan-coordinator/values-prod.yaml
yq -i '.image.tag = "${{ env.BUILD_SUFFIX }}"' tfrs/charts/scan-handler/values-prod.yaml

- name: GitHub Commit & Push
shell: bash {0}
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
git add -A
git commit -m "Update the image tag to ${{ env.BUILD_SUFFIX }} on Prod"
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:
openshift_server_url: ${{ secrets.OPENSHIFT_SERVER }}
openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
insecure_skip_tls_verify: true
namespace: ${{ env.TEST_NAMESPACE }}

- name: Tag and deploy to Prod
run: |
helm -n ${{ env.PROD_NAMESPACE }} list
oc tag ${{ env.TEST_NAMESPACE }}/tfrs-backend:${{ env.BUILD_SUFFIX }} ${{ env.PROD_NAMESPACE }}/tfrs-backend:${{ env.BUILD_SUFFIX }}
oc tag ${{ env.TEST_NAMESPACE }}/tfrs-frontend:${{ env.BUILD_SUFFIX }} ${{ env.PROD_NAMESPACE }}/tfrs-frontend:${{ env.BUILD_SUFFIX }}
oc tag ${{ env.TEST_NAMESPACE }}/tfrs-celery:${{ env.BUILD_SUFFIX }} ${{ env.PROD_NAMESPACE }}/tfrs-celery:${{ env.BUILD_SUFFIX }}
oc tag ${{ env.TEST_NAMESPACE }}/tfrs-scan-coordinator:${{ env.BUILD_SUFFIX }} ${{ env.PROD_NAMESPACE }}/tfrs-scan-coordinator:${{ env.BUILD_SUFFIX }}
oc tag ${{ env.TEST_NAMESPACE }}/tfrs-scan-handler:${{ env.BUILD_SUFFIX }} ${{ env.PROD_NAMESPACE }}/tfrs-scan-handler:${{ env.BUILD_SUFFIX }}
oc tag ${{ env.TEST_NAMESPACE }}/tfrs-notification-server:${{ env.BUILD_SUFFIX }} ${{ env.PROD_NAMESPACE }}/tfrs-notification-server:${{ env.BUILD_SUFFIX }}
cd tfrs/charts/backend
helm -n ${{ env.PROD_NAMESPACE }} -f ./values-prod.yaml upgrade --install tfrs-backend-prod . \
--set podAnnotations.rolloutTriggered="A$(date +%s)E"
cd ../frontend
helm -n ${{ env.PROD_NAMESPACE }} -f ./values-prod.yaml upgrade --install tfrs-frontend-prod . \
--set podAnnotations.rolloutTriggered="A$(date +%s)E"
cd ../notification-server
helm -n ${{ env.PROD_NAMESPACE }} -f ./values-prod.yaml upgrade --install tfrs-notification-server-prod . \
--set podAnnotations.rolloutTriggered="A$(date +%s)E"
cd ../celery
helm -n ${{ env.PROD_NAMESPACE }} -f ./values-prod.yaml upgrade --install tfrs-celery-prod . \
--set podAnnotations.rolloutTriggered="A$(date +%s)E"
cd ../scan-coordinator
helm -n ${{ env.PROD_NAMESPACE }} -f ./values-prod.yaml upgrade --install tfrs-scan-coordinator-prod . \
--set podAnnotations.rolloutTriggered="A$(date +%s)E"
cd ../scan-handler
helm -n ${{ env.PROD_NAMESPACE }} -f ./values-prod.yaml upgrade --install tfrs-scan-handler-prod . \
--set podAnnotations.rolloutTriggered="A$(date +%s)E"
168 changes: 168 additions & 0 deletions .github/workflows/test-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
name: TFRS New Pipeline Test release-2.22.0

on:
workflow_dispatch:

env:
GIT_URL: https://github.com/bcgov/tfrs.git
DEV_NAMESPACE: ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-dev
TEST_NAMESPACE: ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-test

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:

install-oc:
runs-on: ubuntu-latest
outputs:
cache-hit: ${{ steps.cache.outputs.cache-hit }}
steps:

- 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 Dev deployment build suffix
needs: install-oc
runs-on: ubuntu-latest

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

steps:
- name: Check out repository
uses: actions/[email protected]

- name: Restore oc command from Cßache
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:
openshift_server_url: ${{ secrets.OPENSHIFT_SERVER }}
openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
insecure_skip_tls_verify: true
namespace: ${{ env.DEV_NAMESPACE }}

- id: get-build-suffix
run: |
build_suffix=$(oc -n ${{ env.DEV_NAMESPACE }} describe deployment/tfrs-frontend-dev | grep Image | awk -F ':' '{print $NF}')
echo "Validating $build_suffix"
if [[ "$build_suffix" =~ ^[0-9]+\.[0-9]+\.[0-9]$ ]]; then
echo "Build suffix $build_suffix format is valid."
echo "BUILD_SUFFIX=$build_suffix" >> $GITHUB_OUTPUT
else
echo "Error: Build suffix $build_suffix format is invalid!"
exit 1
fi

deploy:
name: Deploy on Test
runs-on: ubuntu-latest
timeout-minutes: 60
needs: [get-build-suffix]

env:
BUILD_SUFFIX: ${{ needs.get-build-suffix.outputs.BUILD_SUFFIX }}

steps:
- id: get-current-time
run: |
echo "CURRENT_TIME=$(TZ="America/Vancouver" date '+%Y-%m-%d %H:%M:%S %Z')" >> $GITHUB_OUTPUT

- name: Ask for approval for TFRS Test deployment
uses: trstringer/[email protected]
with:
secret: ${{ github.TOKEN }}
approvers: AlexZorkin,kuanfandevops,prv-proton,JulianForeman,kevin-hashimoto,dhaselhan
minimum-approvals: 1
issue-title: "TFRS ${{ env.BUILD_SUFFIX }} Test Deployment at ${{ steps.get-current-time.outputs.CURRENT_TIME }}"

- name: Checkout Manifest repository
uses: actions/[email protected]
with:
repository: bcgov-c/tenant-gitops-0ab226
ref: main
ssh-key: ${{ secrets.MANIFEST_REPO_DEPLOY_KEY }}

- name: Update tags
uses: mikefarah/[email protected]
with:
cmd: |
yq -i '.image.tag = "${{ env.BUILD_SUFFIX }}"' tfrs/charts/backend/values-test.yaml
yq -i '.image.tag = "${{ env.BUILD_SUFFIX }}"' tfrs/charts/frontend/values-test.yaml
yq -i '.image.tag = "${{ env.BUILD_SUFFIX }}"' tfrs/charts/notification-server/values-test.yaml
yq -i '.image.tag = "${{ env.BUILD_SUFFIX }}"' tfrs/charts/celery/values-test.yaml
yq -i '.image.tag = "${{ env.BUILD_SUFFIX }}"' tfrs/charts/scan-coordinator/values-test.yaml
yq -i '.image.tag = "${{ env.BUILD_SUFFIX }}"' tfrs/charts/scan-handler/values-test.yaml

- name: GitHub Commit & Push
shell: bash {0}
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
git add -A
git commit -m "Update the image tag to ${{ env.BUILD_SUFFIX }} on Test"
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:
openshift_server_url: ${{ secrets.OPENSHIFT_SERVER }}
openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
insecure_skip_tls_verify: true
namespace: ${{ env.TOOLS_NAMESPACE }}

- name: Tag and deploy to Test
run: |
helm -n ${{ env.TEST_NAMESPACE }} list
oc tag ${{ env.DEV_NAMESPACE }}/tfrs-backend:${{ env.BUILD_SUFFIX }} ${{ env.TEST_NAMESPACE }}/tfrs-backend:${{ env.BUILD_SUFFIX }}
oc tag ${{ env.DEV_NAMESPACE }}/tfrs-frontend:${{ env.BUILD_SUFFIX }} ${{ env.TEST_NAMESPACE }}/tfrs-frontend:${{ env.BUILD_SUFFIX }}
oc tag ${{ env.DEV_NAMESPACE }}/tfrs-celery:${{ env.BUILD_SUFFIX }} ${{ env.TEST_NAMESPACE }}/tfrs-celery:${{ env.BUILD_SUFFIX }}
oc tag ${{ env.DEV_NAMESPACE }}/tfrs-scan-coordinator:${{ env.BUILD_SUFFIX }} ${{ env.TEST_NAMESPACE }}/tfrs-scan-coordinator:${{ env.BUILD_SUFFIX }}
oc tag ${{ env.DEV_NAMESPACE }}/tfrs-scan-handler:${{ env.BUILD_SUFFIX }} ${{ env.TEST_NAMESPACE }}/tfrs-scan-handler:${{ env.BUILD_SUFFIX }}
oc tag ${{ env.DEV_NAMESPACE }}/tfrs-notification-server:${{ env.BUILD_SUFFIX }} ${{ env.TEST_NAMESPACE }}/tfrs-notification-server:${{ env.BUILD_SUFFIX }}
cd tfrs/charts/backend
helm -n ${{ env.TEST_NAMESPACE }} -f ./values-test.yaml upgrade --install tfrs-backend-test . \
--set podAnnotations.rolloutTriggered="A$(date +%s)E"
cd ../frontend
helm -n ${{ env.TEST_NAMESPACE }} -f ./values-test.yaml upgrade --install tfrs-frontend-test . \
--set podAnnotations.rolloutTriggered="A$(date +%s)E"
cd ../notification-server
helm -n ${{ env.TEST_NAMESPACE }} -f ./values-test.yaml upgrade --install tfrs-notification-server-test . \
--set podAnnotations.rolloutTriggered="A$(date +%s)E"
cd ../celery
helm -n ${{ env.TEST_NAMESPACE }} -f ./values-test.yaml upgrade --install tfrs-celery-test . \
--set podAnnotations.rolloutTriggered="A$(date +%s)E"
cd ../scan-coordinator
helm -n ${{ env.TEST_NAMESPACE }} -f ./values-test.yaml upgrade --install tfrs-scan-coordinator-test . \
--set podAnnotations.rolloutTriggered="A$(date +%s)E"
cd ../scan-handler
helm -n ${{ env.TEST_NAMESPACE }} -f ./values-test.yaml upgrade --install tfrs-scan-handler-test . \
--set podAnnotations.rolloutTriggered="A$(date +%s)E"
Loading
Loading