From 08d27914ecb660bbc4a59f7fdccecafd6f1c4bc1 Mon Sep 17 00:00:00 2001 From: Kuan Fan Date: Thu, 6 Jun 2024 14:34:02 -0700 Subject: [PATCH] initial updates for 0.3.0 --- .github/workflows/build-release.yaml | 150 --------------------------- .github/workflows/dev-ci.yaml | 6 +- .github/workflows/prod-ci.yaml | 4 +- .github/workflows/test-ci.yaml | 4 +- frontend/package.json | 2 +- 5 files changed, 8 insertions(+), 158 deletions(-) delete mode 100644 .github/workflows/build-release.yaml diff --git a/.github/workflows/build-release.yaml b/.github/workflows/build-release.yaml deleted file mode 100644 index 3e232aaf..00000000 --- a/.github/workflows/build-release.yaml +++ /dev/null @@ -1,150 +0,0 @@ -## For each release, the value of workflow name, branches, PR_NUMBER and RELEASE_NAME need to be adjusted accordingly -## Also change the .pipelin/lib/config.js version number -name: CTHUB v0.2.0 - -on: - # push: - # branches: [ release-0.2.0 ] - workflow_dispatch: - workflow_call: - -env: - ## The pull request number of the Tracking pull request to merge the release branch to main - PR_NUMBER: 73 - RELEASE_NAME: release-0.2.0 - -jobs: - - ## This is the CI job - build: - - name: Build CTHUB on Openshift - runs-on: ubuntu-latest - timeout-minutes: 60 - - steps: - - ## it will checkout to /home/runner/work/cthub/cthub - - name: Check out repository - uses: actions/checkout@v3 - - # open it when cthub updated the python packages - #- name: Run django tests - # uses: kuanfandevops/django-test-action@cthub-django-test - # with: - # settings-dir-path: "backend/cthub" - # requirements-file: "backend/requirements.txt" - # managepy-dir: backend - - ## Log in to Openshift with a token of service account - - name: Log in to Openshift - uses: redhat-actions/oc-login@v1.3 - with: - openshift_server_url: ${{ secrets.OPENSHIFT_SERVER }} - openshift_token: ${{ secrets.OPENSHIFT_TOKEN }} - insecure_skip_tls_verify: true - namespace: ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-tools - - ## Run build on Openshift - - name: Run build - run: | - cd .pipeline - npm install - npm run build -- --pr=${{ env.PR_NUMBER }} --env=build - - # deploy-on-dev: - - # name: Deploy CTHUB on Dev Environment - # runs-on: ubuntu-latest - # timeout-minutes: 60 - # needs: build - - # steps: - - # - name: Check out repository - # uses: actions/checkout@v3 - - # - name: Log in to Openshift - # uses: redhat-actions/oc-login@v1.3 - # with: - # openshift_server_url: ${{ secrets.OPENSHIFT_SERVER }} - # openshift_token: ${{ secrets.OPENSHIFT_TOKEN }} - # insecure_skip_tls_verify: true - # namespace: ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-dev - - # - name: Run BCDK deployment on CTHUB Dev environment - # run: | - # cd .pipeline - # echo "Deploying CTHUB ${{ env.RELEASE_NAME }} on Dev" - # npm install - # npm run deploy -- --pr=${{ env.PR_NUMBER }} --env=dev - - # deploy-on-test: - - # name: Deploy CTHUB on Test Environment - # runs-on: ubuntu-latest - # timeout-minutes: 60 - # needs: deploy-on-dev - - # steps: - - # - name: Check out repository - # uses: actions/checkout@v3 - - # - name: Log in to Openshift - # uses: redhat-actions/oc-login@v1.3 - # with: - # openshift_server_url: ${{ secrets.OPENSHIFT_SERVER }} - # openshift_token: ${{ secrets.OPENSHIFT_TOKEN }} - # insecure_skip_tls_verify: true - # namespace: ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-test - - # - name: Ask for approval for CTHUB Test deployment - # uses: trstringer/manual-approval@v1.6.0 - # with: - # secret: ${{ github.TOKEN }} - # approvers: emi-hi,tim738745,kuanfandevops,JulianForeman - # minimum-approvals: 1 - # issue-title: "CTHUB ${{ env.RELEASE_NAME }} Test Deployment" - - # - name: Run BCDK deployment on CTHUB Test environment - # run: | - # cd .pipeline - # echo "Deploying CTHUB ${{ env.RELEASE_NAME }} on Test" - # npm install - # npm run deploy -- --pr=${{ env.PR_NUMBER }} --env=test - - deploy-on-prod: - - name: Deploy CTHUB on Prod Environment - runs-on: ubuntu-latest - timeout-minutes: 60 - # needs: deploy-on-test - - steps: - - - name: Check out repository - uses: actions/checkout@v3 - - - name: Log in to Openshift - uses: redhat-actions/oc-login@v1.3 - with: - openshift_server_url: ${{ secrets.OPENSHIFT_SERVER }} - openshift_token: ${{ secrets.OPENSHIFT_TOKEN }} - insecure_skip_tls_verify: true - namespace: ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-prod - - - name: Ask for approval for CTHUB Prod deployment - uses: trstringer/manual-approval@v1.6.0 - with: - secret: ${{ github.TOKEN }} - approvers: emi-hi,tim738745,kuanfandevops,JulianForeman - minimum-approvals: 2 - issue-title: "CTHUB ${{ env.RELEASE_NAME }} Prod Deployment" - - - name: Run BCDK deployment on CTHUB Prod environment - run: | - cd .pipeline - echo "Deploying CTHUB ${{ env.RELEASE_NAME }} on Prod" - npm install - npm run deploy -- --pr=${{ env.PR_NUMBER }} --env=prod diff --git a/.github/workflows/dev-ci.yaml b/.github/workflows/dev-ci.yaml index 42437304..59968be8 100644 --- a/.github/workflows/dev-ci.yaml +++ b/.github/workflows/dev-ci.yaml @@ -1,17 +1,17 @@ ## For each release, the value of workflow name, branches and VERSION need to be adjusted accordingly -name: CTHUB 0.2.0 Dev CI +name: CTHUB 0.3.0 Dev CI on: push: - branches: [ release-0.2.0 ] + branches: [ release-0.3.0 ] paths: - frontend/** - backend/** workflow_dispatch: env: - VERSION: 0.2.0 + VERSION: 0.3.0 GIT_URL: https://github.com/bcgov/cthub.git TOOLS_NAMESPACE: ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-tools DEV_NAMESPACE: ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-dev diff --git a/.github/workflows/prod-ci.yaml b/.github/workflows/prod-ci.yaml index a561b435..c0a881ba 100644 --- a/.github/workflows/prod-ci.yaml +++ b/.github/workflows/prod-ci.yaml @@ -1,11 +1,11 @@ ## For each release, the value of workflow name, branches and VERSION need to be adjusted accordingly -name: CTHUB 0.2.0 Prod CI +name: CTHUB 0.3.0 Prod CI on: workflow_dispatch: env: - VERSION: 0.2.0 + VERSION: 0.3.0 GIT_URL: https://github.com/bcgov/cthub.git TEST_NAMESPACE: ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-test PROD_NAMESPACE: ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-prod diff --git a/.github/workflows/test-ci.yaml b/.github/workflows/test-ci.yaml index 6a8da706..3217deb1 100644 --- a/.github/workflows/test-ci.yaml +++ b/.github/workflows/test-ci.yaml @@ -1,11 +1,11 @@ ## For each release, the value of workflow name, branches and VERSION need to be adjusted accordingly -name: CTHUB 0.2.0 Test CI +name: CTHUB 0.3.0 Test CI on: workflow_dispatch: env: - VERSION: 0.2.0 + VERSION: 0.3.0 GIT_URL: https://github.com/bcgov/cthub.git DEV_NAMESPACE: ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-dev TEST_NAMESPACE: ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-test diff --git a/frontend/package.json b/frontend/package.json index d528a73f..868ba3bc 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "frontend", - "version": "0.2.0", + "version": "0.3.0", "private": true, "dependencies": { "@emotion/react": "^11.6.0",