Skip to content
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
11 changes: 5 additions & 6 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.0
name: TFRS New Pipeline Dev release-3.0.1

on:
push:
branches: [release-3.0.0]
branches: [release-3.0.1]
paths:
- frontend/**
- backend/**
Expand All @@ -13,14 +13,13 @@ 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.0"
GIT_REF: "release-3.0.1"

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

jobs:

install-oc:
runs-on: ubuntu-latest
outputs:
Expand All @@ -33,7 +32,7 @@ jobs:
id: cache
uses: actions/[email protected]
with:
path: /usr/local/bin/oc # Path where the `oc` binary will be installed
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)
Expand All @@ -58,7 +57,7 @@ jobs:
steps:
- id: get-version
run: |
echo "VERSION=3.0.0" >> $GITHUB_OUTPUT
echo "VERSION=3.0.1" >> $GITHUB_OUTPUT

build-backend:
name: Build tfrs Backend
Expand Down
119 changes: 0 additions & 119 deletions .github/workflows/dev-release.yaml

This file was deleted.

11 changes: 5 additions & 6 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.0
name: TFRS New Pipeline Prod release-3.0.1

on:
workflow_dispatch:
Expand All @@ -13,7 +13,6 @@
cancel-in-progress: true

jobs:

install-oc:
runs-on: ubuntu-latest
outputs:
Expand All @@ -23,7 +22,7 @@
id: cache
uses: actions/[email protected]
with:
path: /usr/local/bin/oc # Path where the `oc` binary will be installed
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)
Expand All @@ -38,41 +37,41 @@
run: oc version --client

get-build-suffix:
name: Find Test deployment 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:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
name: Deploy on Prod
runs-on: ubuntu-latest
timeout-minutes: 60
Expand All @@ -85,14 +84,14 @@
- 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 }}"
issue-title: "TFRS ${{ env.BUILD_SUFFIX }} Prod Deployment at ${{ steps.get-current-time.outputs.CURRENT_TIME }}"

- name: Checkout Manifest repository
uses: actions/[email protected]
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/test-ci.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: TFRS New Pipeline Test release-3.0.0
name: TFRS New Pipeline Test release-3.0.1

on:
workflow_dispatch:
Expand All @@ -13,18 +13,16 @@
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
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)
Expand All @@ -39,44 +37,44 @@
run: oc version --client

get-build-suffix:
name: Find Dev deployment 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:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium test

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
name: Deploy on Test
runs-on: ubuntu-latest
timeout-minutes: 60
Expand All @@ -96,7 +94,7 @@
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 }}"
issue-title: "TFRS ${{ env.BUILD_SUFFIX }} Test Deployment at ${{ steps.get-current-time.outputs.CURRENT_TIME }}"

- name: Checkout Manifest repository
uses: actions/[email protected]
Expand Down
Loading
Loading