Skip to content

Commit

Permalink
Tracking pull request to merge main-release-jan-2024 to master (#2750)
Browse files Browse the repository at this point in the history
* chore: updated django backend image to newwer version to fix archive dependancy

* fix: adjust credit transfer agreement date error message (#2469)

Improve the error message shown when a user tries to propose a credit transfer with an empty Agreement Date field.

Previous message: 'Error! Date has wrong format. Use one of these formats instead: YYYY-MM-DD.'
New message: 'Error! Please enter a valid date in the Agreement Date field: YYYY-MM-DD.'

* fix: adjust column widths in xls transactions sheet

Reduce the width of the 'Effective Date' column and widen the 'Comments' column in Excel export for better data readability.

Due to the previously added 'Category' column, adjust the numbers of all columns after column 7 by increasing them by one. (Column numbers start from 0)

* fix: removed 2023 option from compliance report dropdown

* fix: remove dropdown options 2023 and later

* fix: remove 2023 >= option on dropdown

* fix: revert org status label changes on edit organization page

This commit reverts unintended label changes on the 'Edit Organization' page to their original state, ensuring UI consistency for IDIR users.

Closes #2704

* Bump django from 3.2.20 to 3.2.23 in /backend

Bumps [django](https://github.com/django/django) from 3.2.20 to 3.2.23.
- [Commits](django/django@3.2.20...3.2.23)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Compliance Report slow loading time fix

Compliance Report Model changes to include latest_report and root_report information
To migrate the data to these new columns
Using select_related and prefetch_related wherever necessary
Making use of the new columns in data retrieval

* review comments fixes

* remove cache logic

Since cache wasn't showing the updated details. have removed it for now.

* Exclusion Report not visible to IDIR users fix

- Added cache for Compliance Report & Organizations
- changes to ComplianceReport Query to retrieve latest reports

* feat: updated maxCredits service method to account for reserved credits

* fix: updated cache_key to sanitize spaces

* bug and failed test cases fix

* revert unintended squash change

* WIP

* Unit test in progress

* compliance units update

* Compliance Unit changes to compliance report spreadsheet

* add pr build template

* update

* add new pipeline

* trigger build

* update to use env

* update parameters

* add brancj build

* get branch name

* pass branch name

* add frontend build

* correct frontend build

* add test

* update version

* Build frontend and backend for Jan pipeline (#2421)

* Update from 2.7.0 to 3.0.0

* Update Jan pipeline (#2433)

* Update frontend route.yaml

* update frontend host

* update frontend host remove dep

* update frontend host name

* open build

* open deploy dep

* Replace Credits and Debits with Compliance Units in Compliance Report Summary View

* add for supplemental reports

* added backend changes

* code enhancement

* january 2024 label updates, lint fixes, snapshot updates

* director acceptance

* initial

* permission changes with migration

* director acceptance

* spreadsheet changes to compliance report as per new act

* remove print lines

* remove print lines

* remove unwanted changes

* Add pull request build for Jan release (#2463)

* fix defects

* update readme

* WIP

* adding schedule B row add fix

* removing consol.log statment

* Bug fix for the draft compliance unit

* Place compliance units in reserve when submitting a 2023 compliance report with a negative net balance

* updating check for a year

* Part 2 Summary not populating values from Schedule B/C fixes to 2507

Part 2 Summary not populating values from Schedule B/C fixes to 2507

* Update ScheduleSummaryContainer

* System converts credits to compliance units when accepting a complicance report prior to 2023

* Revert "System converts credits to compliance units when accepting a complicance report prior to 2023"

This reverts commit f78af66.

* feat: only show active orgs in credit transfer selection

* Compliance unit bug fixes and test cases

* minor fixes

* Line 28 comments fix

* calculation error fix

* test scenarios

* adding test cases for compliance units

* feat: updated organization label column for status to registered

* labels for organization edit, details, and create views

* feat: added more flexible filtering to org registered column

* Prevent Inactive organization from transferring credits buy or sell

* System converting credits to compliance units for 2023 prior compliance reports

* feat: new credit transaction type added to system administrative adjustment

* fix: unit test updates

* fixed migration order

* fix: missing id

* fix: negative frontend validation

* rebase fix

* UI changes

* delta changes fix

* minor UI fixes

* Compliance Report Spreadsheet fix for date in summary section

* Compliance Unit Edge test cases for backend

* comment change

* include migration for test cases

* name conventions fix

* supplemntal bug fix for compliance units reporting

* chore: merged migrations from rebase

* fix: get summary test fix

* Remove Actions and Last Transaction column from Organizations table (#2580)

* Remove Actions and Last Transaction column from Organizations table

* backend change to include/exclude actin from xls

* Report History section grouping status changes incorrectly -fix (#2582)

Co-authored-by: Prashanth Venkateshappa <[email protected]>

* Feat: Label updates for Part 3 Awards, File Submissions - 2491 2492 (#2587)

* feat: updated labels and nomenclature for part3 awards and file submissions

* chore: linting, snapshots, unit test fixes

---------

Co-authored-by: Your Name <[email protected]>

* fix: refactored get summary method and fixed scenario

* Bug for reserve compliance units when submitted.

* connect to crunchydb (#2608)

* fix for Summary section of compliance units to show changes

* minor fix

* fix

* code optimization

* comments for reference

* code optimize

* optimize

* minor fixes

* penalty miscalculation fix

* status fix revert

* adding fix for routing issue of credit/debit

* File Submission tab label changes

* fix: added missing get_deltas method to update compliance report method

* chore: linting, snapshots, test updates

* Compliance Unit changes bug fixes for all the scenarios covered.

* scenario 17 fix

* remove redundant code

* fix for TFRS - Scenario 10 not showing the correct math for calculating the penalty amount#2607

* scenario 8 fix

* code optimize

* TFRS new act label revisions - removing referenes to credits 2583

* fix for Analyst recommend transfer approval buttons not appearing in Jan release

* feat: unit test for zero scenario 3

* fix for Inaccurate compliant non-compliant determination in the assessment section for 2023 reporting

* Remove/hide balance change in Assessment Section

* feat: updated tooltip for compliance units

* feat: check for zero balance on director acceptance

* fix: unit test update

* Feat: Part 3 Award Label updates 2603

* feat: lables updated according to spec

* chore: linting fixes and snapshots

* Feat: Dashboard Label updates 2474

* Adminstrative Adjustment changes 2431 2583

* chore: updated snapshots and linting

* chore: snapshots updated

* bug fix for non compliance penalty issue

* code optimize

* minor fixes

* minor fix

* fix: formatting fix on react-markdown

* New Act Label Changes - Transactions view page using HDE - time based#2602

* TFRS - Summary & Declaration page not loading for 2022 and prior compliance reports#2647

* chore: fixed unit tests for older cases

* Updates and fixes for bugs found during testing

* label updates

* fix: updated logic to prevent zero transactions

* New Act labels - transaction status change based on time

* TFRS - Time-based transaction label changes for the new Act#2601

* New act label changes - Transactions Page 2495

* fix: label updates for varied views

* TFRS - Separate comment disclosure notice based on feature and comment type#2652

* Update langEnUs.js

* TFRS - New Act Label Changes - Transactions view page using HDE - time based#2602

* fix: logic fix on less than zero transactions

* TFRS - Remove credit market link from BCeID and IDIR dashboards in January release#2661

* fix: label fixes on new initiative agreement, linting, unit tests

* fixing wrong comment

* Fix: Filtering issues fix for Credit transactions and Compliance Reports

* TFRS - File submission filtering from dashboard link not working - IDIR only #2664

* fix: updated transfer labels for BCeID users according to new Act

This commit makes the following updates to the New Transfer page for BCeID users, ensuring alignment with the new Act:

- Change the dropdown label from 'Select a Fuel Supplier' to 'Select an Organization'.

- The signing authority declaration statement is now updated to: 'I confirm that records evidencing each matter reported under section 17 of the Low Carbon Fuel (General) Regulation are available on request.'

Additionally, a database migration is added to apply the signing authority declaration statement label change within the existing record.

Closes #2690

* refactor: changed error logging to warning and added raise in migration

* add jan release test deploy

* specify branch name for jab test deploy

* add test deploy

* add runs-on

* add runs-on

* add branches for workflow_dispatch

* add new value files for jan dry run

* deploy jan release to test

* split test approval and deploy

* fix: rearranged migration order to sync with main release branch

* fix: rearranged migration order to match master

* fix: updated migration order to match master for upcoming merge (#2742)

* update pipeline merge install and upgrade

* add notification sever

* update notification server

* update notification serverimage name

* update notification certs url

* add keycloak url and adjust resource

* update knps for jan release

* update existing network policy

* fix: update labels and remove old features on add/edit organization

* chore: reverted year limit on compliance report

* refactor: lint fix, removed semicolons, switched to single quotes

* refactor: lint fix, removed extra commas

* fix: renamed label name following linting adjustments

* fix: updated organization add/edit form test snapshot

* fix: updated labels

* fix: fixed non status related loading for file submissions page

* fix: revise error message for insufficient compliance units

* fix: fix wrong labels in transfer confirmation modal

* fix: fix broken file submission link on BCeID dashboard

* fix: TFRS - Update Notification descriptions to align with new Act labels #2765

* fix: hide lcfs email on org details page for idir users

* add jab release drawino and upgrade autoscaling apiVersion

* update char number

* test workflow

* disable auto scaling for dev

* update autoscaling version

* update teh workflow to fast deployment

* open the test and linting

* feat: TFRS - Adjust 'Part 3 Award' label for transaction type in the Historical Data Entry feature #2773

* fix: fix incorrect labels in initiative agreement issuance transaction

* fix: update labels in notifications settings as per new act

* fix: update bceid and idir guide links to external urls

* fix: correct labels in transfer confirmation modal

* fix: correct effective date of transfer 2095

* HDE Transactions efective date fix in spreadsheet

* fix: fixes on label and compliance years

* fix: add a reverse noop to avoid downgrade issues

* fix part 3 label in the historical data entry table

* fix: update two notification lables

* fix: update modal confirmLabel logic to handle different transaction types

* fix: fix compliance period year of transfer 2095

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Your Name <[email protected]>
Co-authored-by: Alex Zorkin <[email protected]>
Co-authored-by: Hamed Valiollahi Bayeki <[email protected]>
Co-authored-by: Kevin Hashimoto <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Prashanth Venkateshappa <[email protected]>
Co-authored-by: Prashanth <[email protected]>
Co-authored-by: jig-patel <[email protected]>
Co-authored-by: Prashanth <[email protected]>
  • Loading branch information
10 people committed Jan 31, 2024
1 parent 6f4ddae commit 9abbaff
Show file tree
Hide file tree
Showing 234 changed files with 13,705 additions and 1,620 deletions.
11 changes: 10 additions & 1 deletion .github/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,17 @@
* tfrs-release.yaml (TFRS release-2.10.0): the pipeline builds the release and deploys on Test and Prod, it needs to be manually triggered
* create-release.yaml (Create Release after merging to master): tag and create the release after merging release branch to master. The description of the tracking pull request becomes release notes

* dev-jan-release.yaml (TFRS Dev Jan Release): the pipeline build Jan 2024 release and deploy on dev for every commit
* dev-release.yaml (TFRS Dev release-2.9.0): the pipeline is automatically triggered when there is a commit to the release branch
* tfrs-release.yaml (TFRS release-2.9.0): the pipelin builds the release and deploy on Test and Prod, it needs to be manually triggered

## Other Pipelines

* branch-deploy-template.yaml (Branch Deploy Template): a pipeline template to deploy a branch
* build-template.yaml (Build Template): a pipeline template to build branch or pull request
* cleanup-cron-workflow-runs.yaml (Scheduled cleanup old workflow runs): a cron job to cleanup the old workflows
* cleanup-workflow-runs.yaml (Cleanup old workflow runs): manually cleanup teh workflow runs

* pr-dev-cicd.yaml (TFRS Dev Jan PR CICD): the pipeline builds Jan 2024 pull requests and deploy on dev if the pull request title ends with build-on-dev
* pr-dev-database-template.yaml (PR Dev Database Template): the template to create database for pull request build
* pr-deploy-template (PR Dev Deploy Template): the template deploys pull request build to dev
* pr-teardown.yaml (TFRS Dev Jan PR Teardown): tear down the Jan 2024 pull request builds from dev
142 changes: 142 additions & 0 deletions .github/workflows/branch-deploy-template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
name: Branch Deploy Template

on:
workflow_call:
inputs:
branch-name: # sample value: release-2.9.0 or main-release-jan-2024
required: true
type: string
# suffix is in format of -dev, -test, -dev-jan, test-jan, -dev-1923, dev-jan-1923
suffix:
required: true
type: string
# env-name is in format of dev, test
env-name:
required: true
type: string
# database-service-host-name, sample tfrs-spilo, tfrs-spilo-jan, tfrs-spilo-dev-1988
database-service-host-name:
required: true
type: string
# this virtual host name, sample tfrs-jan-vhost
rabbitmq-vhost:
required: true
type: string
secrets:
tools-namespace:
required: true
namespace:
required: true
openshift-server:
required: true
openshift-token:
required: true

jobs:

deploy:

name: Deploy tfrs
runs-on: ubuntu-latest
timeout-minutes: 60

steps:

- name: Check out repository
uses: actions/checkout@v3
with:
ref: ${{ inputs.branch-name }}

- 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: ${{ secrets.tools-namespace }}

- name: Deploy tfrs-frontend
shell: bash {0}
run: |
oc tag ${{ secrets.tools-namespace }}/tfrs-frontend:build-${{ inputs.branch-name }} ${{ secrets.namespace }}/tfrs-frontend:${{ inputs.env-name }}-${{ inputs.branch-name }}
cd charts/tfrs-apps/charts/tfrs-frontend
helm status -n ${{ secrets.namespace }} tfrs-frontend${{ inputs.suffix }}
helm upgrade --install \
--set frontendImageTagName=${{ inputs.env-name }}-${{ inputs.branch-name }} \
--set suffix=${{ inputs.suffix }} \
--set namespace=${{ secrets.namespace }} \
--set envName=${{ inputs.env-name }} \
-n ${{ secrets.namespace }} -f ./values${{ inputs.suffix }}.yaml tfrs-frontend${{ inputs.suffix }} .
- name: Deploy tfrs-backend
shell: bash {0}
run: |
oc tag ${{ secrets.tools-namespace }}/tfrs-backend:build-${{ inputs.branch-name }} ${{ secrets.namespace }}/tfrs-backend:${{ inputs.env-name }}-${{ inputs.branch-name }}
cd charts/tfrs-apps/charts/tfrs-backend
helm status -n ${{ secrets.namespace }} tfrs-backend${{ inputs.suffix }}
helm upgrade --install \
--set backendImageTagName=${{ inputs.env-name }}-${{ inputs.branch-name }} \
--set suffix=${{ inputs.suffix }} \
--set namespace=${{ secrets.namespace }} \
--set envName=${{ inputs.env-Name }} \
--set databaseServiceHostName=${{ inputs.database-service-host-name }} \
--set rabbitmqVHost=${{ inputs.rabbitmq-vhost }} \
-n ${{ secrets.namespace }} -f ./values${{ inputs.suffix }}.yaml tfrs-backend${{ inputs.suffix }} .
- name: Deploy tfrs-celery
shell: bash {0}
run: |
oc tag ${{ secrets.tools-namespace }}/tfrs-celery:build-${{ inputs.branch-name }} ${{ secrets.namespace }}/tfrs-celery:${{ inputs.env-name }}-${{ inputs.branch-name }}
cd charts/tfrs-apps/charts/tfrs-celery
helm status -n ${{ secrets.namespace }} tfrs-celery${{ inputs.suffix }}
helm upgrade --install \
--set celeryImageTagName=${{ inputs.env-name }}-${{ inputs.branch-name }} \
--set suffix=${{ inputs.suffix }} \
--set namespace=${{ secrets.namespace }} \
--set envName=${{ inputs.env-Name }} \
--set databaseServiceHostName=${{ inputs.database-service-host-name }} \
--set rabbitmqVHost=${{ inputs.rabbitmq-vhost }} \
-n ${{ secrets.namespace }} -f ./values${{ inputs.suffix }}.yaml tfrs-celery${{ inputs.suffix }} .
- name: Deploy tfrs-scan-handler
shell: bash {0}
run: |
oc tag ${{ secrets.tools-namespace }}/tfrs-scan-handler:build-${{ inputs.branch-name }} ${{ secrets.namespace }}/tfrs-scan-handler:${{ inputs.env-name }}-${{ inputs.branch-name }}
cd charts/tfrs-apps/charts/tfrs-scan-handler
helm status -n ${{ secrets.namespace }} tfrs-scan-handler${{ inputs.suffix }}
helm upgrade --install \
--set scanHandlerImageTagName=${{ inputs.env-name }}-${{ inputs.branch-name }} \
--set suffix=${{ inputs.suffix }} \
--set namespace=${{ secrets.namespace }} \
--set envName=${{ inputs.env-Name }} \
--set databaseServiceHostName=${{ inputs.database-service-host-name }} \
--set rabbitmqVHost=${{ inputs.rabbitmq-vhost }} \
-n ${{ secrets.namespace }} -f ./values${{ inputs.suffix }}.yaml tfrs-scan-handler${{ inputs.suffix }} .
- name: Deploy tfrs-scan-coordinator
shell: bash {0}
run: |
oc tag ${{ secrets.tools-namespace }}/tfrs-scan-coordinator:build-${{ inputs.branch-name }} ${{ secrets.namespace }}/tfrs-scan-coordinator:${{ inputs.env-name }}-${{ inputs.branch-name }}
cd charts/tfrs-apps/charts/tfrs-scan-coordinator
helm status -n ${{ secrets.namespace }} tfrs-scan-coordinator${{ inputs.suffix }}
helm upgrade --install \
--set scanCoordinatorImageTagName=${{ inputs.env-name }}-${{ inputs.branch-name }} \
--set suffix=${{ inputs.suffix }} \
--set namespace=${{ secrets.namespace }} \
--set envName=${{ inputs.env-Name }} \
--set rabbitmqVHost=${{ inputs.rabbitmq-vhost }} \
-n ${{ secrets.namespace }} -f ./values${{ inputs.suffix }}.yaml tfrs-scan-coordinator${{ inputs.suffix }} .
- name: Deploy tfrs-notification-server
shell: bash {0}
run: |
oc tag ${{ secrets.tools-namespace }}/tfrs-notification-server:build-${{ inputs.branch-name }} ${{ secrets.namespace }}/tfrs-notification-server:${{ inputs.env-name }}-${{ inputs.branch-name }}
cd charts/tfrs-apps/charts/tfrs-notification-server
helm status -n ${{ secrets.namespace }} tfrs-notification-server${{ inputs.suffix }}
helm upgrade --install \
--set notificationServerImageTagName=${{ inputs.env-name }}-${{ inputs.branch-name }} \
--set suffix=${{ inputs.suffix }} \
--set namespace=${{ secrets.namespace }} \
--set envName=${{ inputs.env-Name }} \
--set rabbitmqVHost=${{ inputs.rabbitmq-vhost }} \
-n ${{ secrets.namespace }} -f ./values${{ inputs.suffix }}.yaml tfrs-notification-server${{ inputs.suffix }} .
233 changes: 233 additions & 0 deletions .github/workflows/build-template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,233 @@

# This template supports both pr build and branch build
name: Build Template

on:
workflow_call:
inputs:
# when build branch, the sample value is -main-release-jan-2024
# when build pull request, the sample value is -jan-2024
suffix:
required: true
type: string
# when build branch, the sample value is main-release-jan-2024
# when build pull request, the sample value is refs/pull/2024/head
checkout-ref:
required: true
type: string
secrets:
tools-namespace:
required: true
openshift-server:
required: true
openshift-token:
required: true

env:
GIT_URL: https://github.com/bcgov/tfrs.git

jobs:

build-backend:

name: Build TFRS Backend on Openshift
runs-on: ubuntu-latest
timeout-minutes: 60

steps:

- name: Check out repository
uses: actions/[email protected]
with:
ref: ${{ inputs.checkout-ref }}

- 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: ${{ secrets.tools-namespace }}

- name: Build tfrs Backend
run: |
cd openshift-v4/templates/backend
oc process -f ./backend-bc.yaml NAME=tfrs \
SUFFIX=-build${{ inputs.suffix}} \
VERSION=build${{ inputs.suffix }} \
GIT_URL=${{ env.GIT_URL }} \
GIT_REF=${{ inputs.checkout-ref }} \
| oc apply --wait=true -f - -n ${{ secrets.tools-namespace }}
oc cancel-build bc/tfrs-backend-build${{ inputs.suffix}} -n ${{ secrets.tools-namespace }} || true
oc start-build --wait=true tfrs-backend-build${{ inputs.suffix}} -n ${{ secrets.tools-namespace }}
build-frontend:

name: Build TFRS Frontend on Openshift
runs-on: ubuntu-latest
timeout-minutes: 60

steps:

- name: Check out repository
uses: actions/[email protected]
with:
ref: ${{ inputs.checkout-ref }}

- 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: ${{ secrets.tools-namespace }}

- name: Build TFRS Frontend
run: |
cd openshift-v4/templates/frontend
oc process -f ./frontend-bc-docker.yaml NAME=tfrs \
SUFFIX=-build${{ inputs.suffix}} \
VERSION=build${{ inputs.suffix }} \
GIT_URL=${{ env.GIT_URL }} \
GIT_REF=${{ inputs.checkout-ref }} \
| oc apply --wait=true -f - -n ${{ secrets.tools-namespace }}
oc cancel-build bc/tfrs-frontend-build${{ inputs.suffix}} -n ${{ secrets.tools-namespace }} || true
oc start-build --wait=true tfrs-frontend-build${{ inputs.suffix}} -n ${{ secrets.tools-namespace }}
build-celery:

name: Build TFRS Celery on Openshift
needs: [build-frontend, build-backend]
runs-on: ubuntu-latest
timeout-minutes: 60

steps:

- name: Check out repository
uses: actions/[email protected]
with:
ref: ${{ inputs.checkout-ref }}

- 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: ${{ secrets.tools-namespace }}

- name: Build TFRS Celery
run: |
cd openshift-v4/templates/celery
pwd
ls -l
oc process -f ./celery-bc-docker.yaml NAME=tfrs \
SUFFIX=-build${{ inputs.suffix}} \
VERSION=build${{ inputs.suffix }} \
GIT_URL=${{ env.GIT_URL }} \
GIT_REF=${{ inputs.checkout-ref }} \
| oc apply --wait=true -f - -n ${{ secrets.tools-namespace }}
oc cancel-build bc/tfrs-celery-build${{ inputs.suffix}} -n ${{ secrets.tools-namespace }} || true
oc start-build --wait=true tfrs-celery-build${{ inputs.suffix}} -n ${{ secrets.tools-namespace }}
build-scan-coordinator:

name: Build TFRS Scan Coordinator on Openshift
needs: [build-frontend, build-backend]
runs-on: ubuntu-latest
timeout-minutes: 60

steps:

- name: Check out repository
uses: actions/[email protected]
with:
ref: ${{ inputs.checkout-ref }}

- 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: ${{ secrets.tools-namespace }}

- name: Build TFRS Scan Coordinator
run: |
cd openshift-v4/templates/scan-coordinator
oc process -f ./scan-coordinator-bc.yaml NAME=tfrs \
SUFFIX=-build${{ inputs.suffix}} \
VERSION=build${{ inputs.suffix }} \
GIT_URL=${{ env.GIT_URL }} \
GIT_REF=${{ inputs.checkout-ref }} \
| oc apply --wait=true -f - -n ${{ secrets.tools-namespace }}
oc cancel-build bc/tfrs-scan-coordinator-build${{ inputs.suffix}} -n ${{ secrets.tools-namespace }} || true
oc start-build --wait=true tfrs-scan-coordinator-build${{ inputs.suffix}} -n ${{ secrets.tools-namespace }}
build-scan-handler:

name: Build TFRS Scan Handler on Openshift
needs: [build-scan-coordinator, build-celery]
runs-on: ubuntu-latest
timeout-minutes: 60

steps:

- name: Check out repository
uses: actions/[email protected]
with:
ref: ${{ inputs.checkout-ref }}

- 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: ${{ secrets.tools-namespace }}

- name: Build TFRS Scan-Handler
run: |
cd openshift-v4/templates/scan-handler
oc process -f ./scan-handler-bc-docker.yaml NAME=tfrs \
SUFFIX=-build${{ inputs.suffix}} \
VERSION=build${{ inputs.suffix }} \
GIT_URL=${{ env.GIT_URL }} \
GIT_REF=${{ inputs.checkout-ref }} \
| oc apply --wait=true -f - -n ${{ secrets.tools-namespace }}
oc cancel-build bc/tfrs-scan-handler-build${{ inputs.suffix}} -n ${{ secrets.tools-namespace }} || true
oc start-build --wait=true tfrs-scan-handler-build${{ inputs.suffix}} -n ${{ secrets.tools-namespace }}
build-notification-server:

name: Build TFRS Notification Server on Openshift
needs: [build-scan-coordinator, build-celery]
runs-on: ubuntu-latest
timeout-minutes: 60

steps:

- name: Check out repository
uses: actions/[email protected]
with:
ref: ${{ inputs.checkout-ref }}

- 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: ${{ secrets.tools-namespace }}

- name: Build TFRS Notification Server
run: |
cd openshift-v4/templates/notification
oc process -f ./notification-server-bc.yaml NAME=tfrs \
SUFFIX=-build${{ inputs.suffix}} \
VERSION=build${{ inputs.suffix }} \
GIT_URL=${{ env.GIT_URL }} \
GIT_REF=${{ inputs.checkout-ref }} \
| oc apply --wait=true -f - -n ${{ secrets.tools-namespace }}
oc cancel-build bc/tfrs-notification-server-build${{ inputs.suffix}} -n ${{ secrets.tools-namespace }} || true
oc start-build --wait=true tfrs-notification-server-build${{ inputs.suffix}} -n ${{ secrets.tools-namespace }}
Loading

0 comments on commit 9abbaff

Please sign in to comment.