-
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 feat/daniel-add-date-validation-to-…
…fc-1304
- Loading branch information
Showing
66 changed files
with
1,627 additions
and
853 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 |
---|---|---|
|
@@ -42,16 +42,31 @@ jobs: | |
echo "IMAGE_TAG retrieved from Test is $imagetag" | ||
echo "IMAGE_TAG=$imagetag" >> $GITHUB_OUTPUT | ||
get-current-time: | ||
name: Get Current Time | ||
runs-on: ubuntu-latest | ||
needs: get-image-tag | ||
|
||
outputs: | ||
CURRENT_TIME: ${{ steps.get-current-time.outputs.CURRENT_TIME }} | ||
|
||
steps: | ||
- id: get-current-time | ||
run: | | ||
TZ="America/Vancouver" | ||
echo "CURRENT_TIME=$(date '+%Y-%m-%d %H:%M:%S %Z')" >> $GITHUB_OUTPUT | ||
# Deplog the image which is running on test to prod | ||
deploy-on-prod: | ||
|
||
name: Deploy LCFS on Prod | ||
runs-on: ubuntu-latest | ||
needs: get-image-tag | ||
needs: [get-image-tag, get-current-time] | ||
timeout-minutes: 60 | ||
|
||
env: | ||
IMAGE_TAG: ${{ needs.get-image-tag.outputs.IMAGE_TAG }} | ||
CURRENT_TIME: ${{ needs.get-current-time.outputs.CURRENT_TIME }} | ||
|
||
steps: | ||
|
||
|
@@ -66,9 +81,17 @@ jobs: | |
uses: trstringer/[email protected] | ||
with: | ||
secret: ${{ github.TOKEN }} | ||
approvers: AlexZorkin,kuanfandevops,hamed-valiollahi,airinggov,areyeslo,dhaselhan,Grulin,justin-lepitzki,kevin-hashimoto | ||
approvers: AlexZorkin,kuanfandevops,hamed-valiollahi,airinggov,areyeslo,dhaselhan,Grulin | ||
minimum-approvals: 2 | ||
issue-title: "LCFS ${{env.IMAGE_TAG }} Prod Deployment" | ||
issue-title: "LCFS ${{env.IMAGE_TAG }} Prod Deployment at ${{ env.CURRENT_TIME }}." | ||
|
||
- 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.PROD_NAMESPACE }} | ||
|
||
- name: Tag LCFS images from Test to Prod | ||
run: | | ||
|
@@ -88,6 +111,6 @@ jobs: | |
git config --global user.name "GitHub Actions" | ||
git add lcfs/charts/lcfs-frontend/values-prod.yaml | ||
git add lcfs/charts/lcfs-backend/values-prod.yaml | ||
git commit -m "update the version with pre-release number for prod" | ||
git commit -m "Update image tag ${{env.IMAGE_TAG }} for prod" | ||
git push | ||
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 |
---|---|---|
|
@@ -225,7 +225,7 @@ jobs: | |
uses: trstringer/[email protected] | ||
with: | ||
secret: ${{ github.TOKEN }} | ||
approvers: AlexZorkin,kuanfandevops,hamed-valiollahi,airinggov,areyeslo,dhaselhan,Grulin,justin-lepitzki,kevin-hashimoto | ||
approvers: AlexZorkin,kuanfandevops,hamed-valiollahi,airinggov,areyeslo,dhaselhan,Grulin,kevin-hashimoto | ||
minimum-approvals: 1 | ||
issue-title: "LCFS ${{ env.VERSION }}-${{ env.PRE_RELEASE }} Test Deployment" | ||
|
||
|
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 |
---|---|---|
|
@@ -8,6 +8,7 @@ __pycache__/ | |
*.py[cod] | ||
*$py.class | ||
docs/ | ||
.DS_Store | ||
|
||
# C extensions | ||
*.so | ||
|
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
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
57 changes: 57 additions & 0 deletions
57
backend/lcfs/db/migrations/versions/2024-12-04-23-00_8491890dd688.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,57 @@ | ||
"""Data Fixes | ||
Revision ID: 8491890dd688 | ||
Revises: aeaa26f5cdd5 | ||
Create Date: 2024-12-04 23:00:10.708533 | ||
""" | ||
|
||
from alembic import op | ||
from sqlalchemy import update | ||
|
||
from lcfs.db.models import FuelType, AllocationTransactionType | ||
from lcfs.db.models.fuel.FuelType import QuantityUnitsEnum | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "8491890dd688" | ||
down_revision = "aeaa26f5cdd5" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.execute( | ||
update(FuelType) | ||
.where(FuelType.fuel_type_id == 6) | ||
.values(units=QuantityUnitsEnum.Kilograms) | ||
) | ||
|
||
op.execute( | ||
update(FuelType).where(FuelType.fuel_type_id == 20).values(fossil_derived=False) | ||
) | ||
|
||
# Update 'type' and 'description' in allocation_transaction_type where allocation_transaction_type_id = 2 | ||
op.execute( | ||
update(AllocationTransactionType) | ||
.where(AllocationTransactionType.allocation_transaction_type_id == 2) | ||
.values( | ||
type="Allocated to", | ||
description="Fuel allocated to another supplier under an allocation agreement", | ||
) | ||
) | ||
|
||
# Update 'type' and 'description' in allocation_transaction_type where allocation_transaction_type_id = 1 | ||
op.execute( | ||
update(AllocationTransactionType) | ||
.where(AllocationTransactionType.allocation_transaction_type_id == 1) | ||
.values( | ||
type="Allocated from", | ||
description="Fuel allocated from another supplier under an allocation agreement", | ||
) | ||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
pass |
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.