Skip to content
Open
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/cleanup-cron-workflow-runs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
actions: write
steps:
- name: Delete workflow runs
uses: Mattraks/delete-workflow-runs@v2.0.4
uses: Mattraks/delete-workflow-runs@v2.1.0
with:
token: ${{ github.token }}
repository: ${{ github.repository }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cleanup-workflow-runs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
actions: write
steps:
- name: Delete workflow runs
uses: Mattraks/delete-workflow-runs@v2.0.4
uses: Mattraks/delete-workflow-runs@v2.1.0
with:
token: ${{ github.token }}
repository: ${{ github.repository }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ jobs:
env:
releasename: ${{ github.event.pull_request.head.ref }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6.0.2
- name: Replace release name
uses: mad9000/actions-find-and-replace-string@4
uses: mad9000/actions-find-and-replace-string@5
id: newereleasename
with:
source: ${{ github.event.pull_request.head.ref }}
find: 'release-'
replace: 'v'
- name: Create Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2.6.1
with:
name: ${{ steps.newereleasename.outputs.value }}
tag_name: ${{ steps.newereleasename.outputs.value }}
Expand Down
102 changes: 51 additions & 51 deletions .github/workflows/dev-ci.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: TFRS New Pipeline Dev release-3.0.1
name: TFRS New Pipeline Dev release-3.1.0

on:
push:
branches: [release-3.0.1]
branches: [release-3.1.0]
paths:
- frontend/**
- backend/**
Expand All @@ -13,7 +13,7 @@ env:
GIT_URL: https://github.com/bcgov/tfrs.git
TOOLS_NAMESPACE: ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-tools
DEV_NAMESPACE: ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-dev
GIT_REF: "release-3.0.1"
GIT_REF: "release-3.1.0"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -26,11 +26,11 @@ jobs:
cache-hit: ${{ steps.cache.outputs.cache-hit }}
steps:
- name: Check out repository
uses: actions/checkout@v4.1.1
uses: actions/checkout@v6.0.2

- name: Set up cache for OpenShift CLI
id: cache
uses: actions/cache@v4.2.0
uses: actions/cache@v5.0.4
with:
path: /usr/local/bin/oc # Path where the `oc` binary will be installed
key: oc-cli-${{ runner.os }}
Expand All @@ -57,7 +57,7 @@ jobs:
steps:
- id: get-version
run: |
echo "VERSION=3.0.1" >> $GITHUB_OUTPUT
echo "VERSION=3.1.0" >> $GITHUB_OUTPUT

build-backend:
name: Build tfrs Backend
Expand All @@ -70,12 +70,12 @@ jobs:

steps:
- name: Check out repository
uses: actions/checkout@v4.1.1
uses: actions/checkout@v6.0.2
with:
ref: ${{ env.GIT_REF }}

- name: Restore oc command from Cache
uses: actions/cache@v4.2.0
uses: actions/cache@v5.0.4
with:
path: /usr/local/bin/oc
key: oc-cli-${{ runner.os }}
Expand All @@ -93,11 +93,11 @@ jobs:
cd openshift-v4/templates/backend
oc process -f ./backend-bc-docker.yaml NAME=tfrs SUFFIX=-${{ env.BUILD_SUFFIX }} VERSION=${{ env.BUILD_SUFFIX }} GIT_URL=${{ env.GIT_URL }} GIT_REF=${{ env.GIT_REF }} | oc apply --wait=true -f - -n ${{ env.TOOLS_NAMESPACE }}
sleep 2s
for build in $(oc -n ${{ env.TOOLS_NAMESPACE }} get builds -l buildconfig=tfrs-backend-${{ env.BUILD_SUFFIX }} -o jsonpath='{.items[?(@.status.phase=="Running")].metadata.name}'); do
echo "canceling $build"
oc -n ${{ env.TOOLS_NAMESPACE }} cancel-build $build
done
sleep 2s
# for build in $(oc -n ${{ env.TOOLS_NAMESPACE }} get builds -l buildconfig=tfrs-backend-${{ env.BUILD_SUFFIX }} -o jsonpath='{.items[?(@.status.phase=="Running")].metadata.name}'); do
# echo "canceling $build"
# oc -n ${{ env.TOOLS_NAMESPACE }} cancel-build $build
# done
# sleep 2s
oc -n ${{ env.TOOLS_NAMESPACE }} start-build tfrs-backend-${{ env.BUILD_SUFFIX }} --wait=true

build-frontend:
Expand All @@ -111,12 +111,12 @@ jobs:

steps:
- name: Check out repository
uses: actions/checkout@v4.1.1
uses: actions/checkout@v6.0.2
with:
ref: ${{ env.GIT_REF }}

- name: Restore oc command from Cache
uses: actions/cache@v4.2.0
uses: actions/cache@v5.0.4
with:
path: /usr/local/bin/oc
key: oc-cli-${{ runner.os }}
Expand All @@ -134,11 +134,11 @@ jobs:
cd openshift-v4/templates/frontend
oc process -f ./frontend-bc-docker.yaml NAME=tfrs SUFFIX=-${{ env.BUILD_SUFFIX }} VERSION=${{ env.BUILD_SUFFIX }} GIT_URL=${{ env.GIT_URL }} GIT_REF=${{ env.GIT_REF }} | oc apply --wait=true -f - -n ${{ env.TOOLS_NAMESPACE }}
sleep 2s
for build in $(oc -n ${{ env.TOOLS_NAMESPACE }} get builds -l buildconfig=tfrs-frontend-${{ env.BUILD_SUFFIX }} -o jsonpath='{.items[?(@.status.phase=="Running")].metadata.name}'); do
echo "canceling $build"
oc -n ${{ env.TOOLS_NAMESPACE }} cancel-build $build
done
sleep 2s
# for build in $(oc -n ${{ env.TOOLS_NAMESPACE }} get builds -l buildconfig=tfrs-frontend-${{ env.BUILD_SUFFIX }} -o jsonpath='{.items[?(@.status.phase=="Running")].metadata.name}'); do
# echo "canceling $build"
# oc -n ${{ env.TOOLS_NAMESPACE }} cancel-build $build
# done
# sleep 2s
oc -n ${{ env.TOOLS_NAMESPACE }} start-build tfrs-frontend-${{ env.BUILD_SUFFIX }} --wait=true

build-scan-coordinator:
Expand All @@ -152,12 +152,12 @@ jobs:

steps:
- name: Check out repository
uses: actions/checkout@v4.1.1
uses: actions/checkout@v6.0.2
with:
ref: ${{ env.GIT_REF }}

- name: Restore oc command from Cache
uses: actions/cache@v4.2.0
uses: actions/cache@v5.0.4
with:
path: /usr/local/bin/oc
key: oc-cli-${{ runner.os }}
Expand All @@ -175,11 +175,11 @@ jobs:
cd openshift-v4/templates/scan-coordinator
oc process -f ./scan-coordinator-bc.yaml NAME=tfrs SUFFIX=-${{ env.BUILD_SUFFIX }} VERSION=${{ env.BUILD_SUFFIX }} GIT_URL=${{ env.GIT_URL }} GIT_REF=${{ env.GIT_REF }} | oc apply --wait=true -f - -n ${{ env.TOOLS_NAMESPACE }}
sleep 2s
for build in $(oc -n ${{ env.TOOLS_NAMESPACE }} get builds -l buildconfig=tfrs-scan-coordinator-${{ env.BUILD_SUFFIX }} -o jsonpath='{.items[?(@.status.phase=="Running")].metadata.name}'); do
echo "canceling $build"
oc -n ${{ env.TOOLS_NAMESPACE }} cancel-build $build
done
sleep 2s
# for build in $(oc -n ${{ env.TOOLS_NAMESPACE }} get builds -l buildconfig=tfrs-scan-coordinator-${{ env.BUILD_SUFFIX }} -o jsonpath='{.items[?(@.status.phase=="Running")].metadata.name}'); do
# echo "canceling $build"
# oc -n ${{ env.TOOLS_NAMESPACE }} cancel-build $build
# done
# sleep 2s
oc -n ${{ env.TOOLS_NAMESPACE }} start-build tfrs-scan-coordinator-${{ env.BUILD_SUFFIX }} --wait=true

build-celery:
Expand All @@ -193,12 +193,12 @@ jobs:

steps:
- name: Check out repository
uses: actions/checkout@v4.1.1
uses: actions/checkout@v6.0.2
with:
ref: ${{ env.GIT_REF }}

- name: Restore oc command from Cache
uses: actions/cache@v4.2.0
uses: actions/cache@v5.0.4
with:
path: /usr/local/bin/oc
key: oc-cli-${{ runner.os }}
Expand All @@ -216,11 +216,11 @@ jobs:
cd openshift-v4/templates/celery
oc process -f ./celery-bc-docker.yaml NAME=tfrs SUFFIX=-${{ env.BUILD_SUFFIX }} VERSION=${{ env.BUILD_SUFFIX }} GIT_URL=${{ env.GIT_URL }} GIT_REF=${{ env.GIT_REF }} | oc apply --wait=true -f - -n ${{ env.TOOLS_NAMESPACE }}
sleep 2s
for build in $(oc -n ${{ env.TOOLS_NAMESPACE }} get builds -l buildconfig=tfrs-celery-${{ env.BUILD_SUFFIX }} -o jsonpath='{.items[?(@.status.phase=="Running")].metadata.name}'); do
echo "canceling $build"
oc -n ${{ env.TOOLS_NAMESPACE }} cancel-build $build
done
sleep 2s
# for build in $(oc -n ${{ env.TOOLS_NAMESPACE }} get builds -l buildconfig=tfrs-celery-${{ env.BUILD_SUFFIX }} -o jsonpath='{.items[?(@.status.phase=="Running")].metadata.name}'); do
# echo "canceling $build"
# oc -n ${{ env.TOOLS_NAMESPACE }} cancel-build $build
# done
# sleep 2s
oc -n ${{ env.TOOLS_NAMESPACE }} start-build tfrs-celery-${{ env.BUILD_SUFFIX }} --wait=true

build-scan-handler:
Expand All @@ -234,12 +234,12 @@ jobs:

steps:
- name: Check out repository
uses: actions/checkout@v4.1.1
uses: actions/checkout@v6.0.2
with:
ref: ${{ env.GIT_REF }}

- name: Restore oc command from Cache
uses: actions/cache@v4.2.0
uses: actions/cache@v5.0.4
with:
path: /usr/local/bin/oc
key: oc-cli-${{ runner.os }}
Expand All @@ -257,11 +257,11 @@ jobs:
cd openshift-v4/templates/scan-handler
oc process -f ./scan-handler-bc-docker.yaml NAME=tfrs SUFFIX=-${{ env.BUILD_SUFFIX }} VERSION=${{ env.BUILD_SUFFIX }} GIT_URL=${{ env.GIT_URL }} GIT_REF=${{ env.GIT_REF }} | oc apply --wait=true -f - -n ${{ env.TOOLS_NAMESPACE }}
sleep 2s
for build in $(oc -n ${{ env.TOOLS_NAMESPACE }} get builds -l buildconfig=tfrs-scan-handler-${{ env.BUILD_SUFFIX }} -o jsonpath='{.items[?(@.status.phase=="Running")].metadata.name}'); do
echo "canceling $build"
oc -n ${{ env.TOOLS_NAMESPACE }} cancel-build $build
done
sleep 2s
# for build in $(oc -n ${{ env.TOOLS_NAMESPACE }} get builds -l buildconfig=tfrs-scan-handler-${{ env.BUILD_SUFFIX }} -o jsonpath='{.items[?(@.status.phase=="Running")].metadata.name}'); do
# echo "canceling $build"
# oc -n ${{ env.TOOLS_NAMESPACE }} cancel-build $build
# done
# sleep 2s
oc -n ${{ env.TOOLS_NAMESPACE }} start-build tfrs-scan-handler-${{ env.BUILD_SUFFIX }} --wait=true

build-notification-server:
Expand All @@ -275,12 +275,12 @@ jobs:

steps:
- name: Check out repository
uses: actions/checkout@v4.1.1
uses: actions/checkout@v6.0.2
with:
ref: ${{ env.GIT_REF }}

- name: Restore oc command from Cache
uses: actions/cache@v4.2.0
uses: actions/cache@v5.0.4
with:
path: /usr/local/bin/oc
key: oc-cli-${{ runner.os }}
Expand All @@ -298,11 +298,11 @@ jobs:
cd openshift-v4/templates/notification
oc process -f ./notification-server-bc.yaml NAME=tfrs SUFFIX=-${{ env.BUILD_SUFFIX }} VERSION=${{ env.BUILD_SUFFIX }} GIT_URL=${{ env.GIT_URL }} GIT_REF=${{ env.GIT_REF }} | oc apply --wait=true -f - -n ${{ env.TOOLS_NAMESPACE }}
sleep 2s
for build in $(oc -n ${{ env.TOOLS_NAMESPACE }} get builds -l buildconfig=tfrs-notification-server-${{ env.BUILD_SUFFIX }} -o jsonpath='{.items[?(@.status.phase=="Running")].metadata.name}'); do
echo "canceling $build"
oc -n ${{ env.TOOLS_NAMESPACE }} cancel-build $build
done
sleep 2s
# for build in $(oc -n ${{ env.TOOLS_NAMESPACE }} get builds -l buildconfig=tfrs-notification-server-${{ env.BUILD_SUFFIX }} -o jsonpath='{.items[?(@.status.phase=="Running")].metadata.name}'); do
# echo "canceling $build"
# oc -n ${{ env.TOOLS_NAMESPACE }} cancel-build $build
# done
# sleep 2s
oc -n ${{ env.TOOLS_NAMESPACE }} start-build tfrs-notification-server-${{ env.BUILD_SUFFIX }} --wait=true

deploy:
Expand All @@ -325,14 +325,14 @@ jobs:

steps:
- name: Checkout Manifest repository
uses: actions/checkout@v4.1.1
uses: actions/checkout@v6.0.2
with:
repository: bcgov-c/tenant-gitops-0ab226
ref: main
ssh-key: ${{ secrets.MANIFEST_REPO_DEPLOY_KEY }}

- name: Update tags
uses: mikefarah/yq@v4.40.5
uses: mikefarah/yq@v4.52.4
with:
cmd: |
yq -i '.image.tag = "${{ env.BUILD_SUFFIX }}"' tfrs/charts/backend/values-dev.yaml
Expand All @@ -352,7 +352,7 @@ jobs:
git push

- name: Restore oc command from Cache
uses: actions/cache@v4.2.0
uses: actions/cache@v5.0.4
with:
path: /usr/local/bin/oc
key: oc-cli-${{ runner.os }}
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/prod-ci.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: TFRS New Pipeline Prod release-3.0.1
name: TFRS New Pipeline Prod release-3.1.0

on:
workflow_dispatch:
Expand All @@ -20,7 +20,7 @@ jobs:
steps:
- name: Set up cache for OpenShift CLI
id: cache
uses: actions/cache@v4.2.0
uses: actions/cache@v5.0.4
with:
path: /usr/local/bin/oc # Path where the `oc` binary will be installed
key: oc-cli-${{ runner.os }}
Expand All @@ -46,7 +46,7 @@ jobs:

steps:
- name: Restore oc command from Cache
uses: actions/cache@v4.2.0
uses: actions/cache@v5.0.4
with:
path: /usr/local/bin/oc
key: oc-cli-${{ runner.os }}
Expand Down Expand Up @@ -86,22 +86,22 @@ jobs:
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/manual-approval@v1.6.0
uses: trstringer/manual-approval@v1.12.0
with:
secret: ${{ github.TOKEN }}
approvers: AlexZorkin,kuanfandevops,prv-proton,JulianForeman,kevin-hashimoto,dhaselhan
approvers: AlexZorkin,kuanfandevops,prv-proton,kevin-hashimoto
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/checkout@v4.1.1
uses: actions/checkout@v6.0.2
with:
repository: bcgov-c/tenant-gitops-0ab226
ref: main
ssh-key: ${{ secrets.MANIFEST_REPO_DEPLOY_KEY }}

- name: Update tags
uses: mikefarah/yq@v4.40.5
uses: mikefarah/yq@v4.52.4
with:
cmd: |
yq -i '.image.tag = "${{ env.BUILD_SUFFIX }}"' tfrs/charts/backend/values-prod.yaml
Expand All @@ -121,7 +121,7 @@ jobs:
git push

- name: Restore oc command from Cache
uses: actions/cache@v4.2.0
uses: actions/cache@v5.0.4
with:
path: /usr/local/bin/oc
key: oc-cli-${{ runner.os }}
Expand Down
Loading
Loading