-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release-0.2.0' into LCFS-1426-UploadFileAttachements-Co…
…mplianceReports
- Loading branch information
Showing
74 changed files
with
2,647 additions
and
637 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -23,9 +23,36 @@ concurrency: | |
|
||
jobs: | ||
|
||
install-oc: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
cache-hit: ${{ steps.cache.outputs.cache-hit }} | ||
steps: | ||
- name: Check out repository | ||
uses: actions/[email protected] | ||
|
||
- 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 | ||
|
||
set-pre-release: | ||
name: Calculate pre-release number | ||
runs-on: ubuntu-latest | ||
needs: [install-oc] | ||
|
||
outputs: | ||
output1: ${{ steps.set-pre-release.outputs.PRE_RELEASE }} | ||
|
@@ -49,6 +76,12 @@ jobs: | |
- name: Check out repository | ||
uses: actions/[email protected] | ||
|
||
- 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: | ||
|
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 |
---|---|---|
|
@@ -19,17 +19,51 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
jobs: | ||
install-oc: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
cache-hit: ${{ steps.cache.outputs.cache-hit }} | ||
steps: | ||
- name: Check out repository | ||
uses: actions/[email protected] | ||
|
||
- 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-version: | ||
if: > | ||
(github.event.action == 'labeled' && github.event.label.name == 'build' && github.event.pull_request.base.ref == github.event.repository.default_branch) || | ||
(github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'build') && github.event.pull_request.base.ref == github.event.repository.default_branch) | ||
name: Retrieve version | ||
runs-on: ubuntu-latest | ||
needs: [install-oc] | ||
|
||
outputs: | ||
output1: ${{ steps.get-version.outputs.VERSION }} | ||
|
||
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: | ||
|
@@ -69,6 +103,12 @@ jobs: | |
with: | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
|
||
- 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: | ||
|
@@ -123,6 +163,12 @@ jobs: | |
ref: main | ||
ssh-key: ${{ secrets.MANIFEST_REPO_DEPLOY_KEY }} | ||
|
||
- 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: | ||
|
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 |
---|---|---|
|
@@ -13,16 +13,48 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
jobs: | ||
install-oc: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
cache-hit: ${{ steps.cache.outputs.cache-hit }} | ||
steps: | ||
- name: Check out repository | ||
uses: actions/[email protected] | ||
|
||
- 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 | ||
|
||
teardown: | ||
if: > | ||
(github.event.action == 'unlabeled' && github.event.label.name == 'build') || | ||
(github.event.action == 'closed' && contains(github.event.pull_request.labels.*.name, 'build') ) | ||
name: PR Teardown | ||
runs-on: ubuntu-latest | ||
needs: [install-oc] | ||
timeout-minutes: 60 | ||
|
||
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] | ||
|
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 |
---|---|---|
|
@@ -14,12 +14,38 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
jobs: | ||
install-oc: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
cache-hit: ${{ steps.cache.outputs.cache-hit }} | ||
steps: | ||
- name: Check out repository | ||
uses: actions/[email protected] | ||
|
||
- 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 | ||
|
||
# Read the image tag from test environment | ||
get-image-tag: | ||
|
||
name: Get the image-tag from values-test.yaml | ||
runs-on: ubuntu-latest | ||
needs: [install-oc] | ||
|
||
outputs: | ||
IMAGE_TAG: ${{ steps.get-image-tag.outputs.IMAGE_TAG }} | ||
|
@@ -84,6 +110,12 @@ jobs: | |
approvers: AlexZorkin,kuanfandevops,hamed-valiollahi,airinggov,areyeslo,dhaselhan,Grulin | ||
minimum-approvals: 2 | ||
issue-title: "LCFS ${{env.IMAGE_TAG }} Prod Deployment at ${{ env.CURRENT_TIME }}." | ||
|
||
- 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] | ||
|
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 |
---|---|---|
|
@@ -14,9 +14,36 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
jobs: | ||
install-oc: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
cache-hit: ${{ steps.cache.outputs.cache-hit }} | ||
steps: | ||
- name: Check out repository | ||
uses: actions/[email protected] | ||
|
||
- 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 | ||
|
||
run-tests: | ||
name: Run Tests | ||
runs-on: ubuntu-latest | ||
needs: [install-oc] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
@@ -229,6 +256,12 @@ jobs: | |
minimum-approvals: 1 | ||
issue-title: "LCFS ${{ env.VERSION }}-${{ env.PRE_RELEASE }} Test Deployment" | ||
|
||
- 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: | ||
|
33 changes: 33 additions & 0 deletions
33
backend/lcfs/db/migrations/versions/2024-12-17-11-23_f93546eaec61.py
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,33 @@ | ||
"""update notification message model | ||
Revision ID: f93546eaec61 | ||
Revises: 5d729face5ab | ||
Create Date: 2024-12-17 11:23:19.563138 | ||
""" | ||
|
||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "f93546eaec61" | ||
down_revision = "5d729face5ab" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column("notification_message", sa.Column("type", sa.Text(), nullable=False)) | ||
op.add_column( | ||
"notification_message", | ||
sa.Column("related_transaction_id", sa.Text(), nullable=False), | ||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_column("notification_message", "related_transaction_id") | ||
op.drop_column("notification_message", "type") | ||
# ### end Alembic commands ### |
36 changes: 36 additions & 0 deletions
36
backend/lcfs/db/migrations/versions/2024-12-17-12-25_5b374dd97469.py
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,36 @@ | ||
"""Add legacy id to compliance reports | ||
Revision ID: 5b374dd97469 | ||
Revises: f93546eaec61 | ||
Create Date: 2024-17-13 12:25:32.076684 | ||
""" | ||
|
||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "5b374dd97469" | ||
down_revision = "f93546eaec61" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column( | ||
"compliance_report", | ||
sa.Column( | ||
"legacy_id", | ||
sa.Integer(), | ||
nullable=True, | ||
comment="ID from TFRS if this is a transferred application, NULL otherwise", | ||
), | ||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_column("compliance_report", "legacy_id") | ||
# ### end Alembic commands ### |
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
Oops, something went wrong.