From 5a964d6bef7c54e282651c1c2f12f5b48a3b9576 Mon Sep 17 00:00:00 2001 From: "Fergus MacConnell WLRS:EX" Date: Tue, 26 Nov 2024 13:18:48 -0800 Subject: [PATCH 1/2] Update merge workflow to deploy to prod. --- .github/workflows/merge.yml | 58 ++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 33 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index c7a62238f..fe66f6ddc 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -33,7 +33,7 @@ jobs: id: pr uses: bcgov-nr/action-get-pr@v0.0.1 - deploys-test: + deploy-test: name: TEST Deploys (${{ needs.init.outputs.pr }}) needs: [init] secrets: inherit @@ -43,35 +43,27 @@ jobs: tag: ${{ needs.init.outputs.pr }} target: test - # deploy-prod: - # name: Deploy (prod) - # needs: [deploy-test, vars] - # uses: bcgov/quickstart-openshift-helpers/.github/workflows/.deployer.yml@v0.6.1 - # secrets: - # oc_namespace: ${{ secrets.OC_NAMESPACE }} - # oc_token: ${{ secrets.OC_TOKEN }} - # with: - # environment: prod - # params: - # --set backend.deploymentStrategy=RollingUpdate - # --set frontend.deploymentStrategy=RollingUpdate - # --set global.autoscaling=true - # --set frontend.pdb.enabled=true - # --set backend.pdb.enabled=true - # promote: - # name: Promote Images - # needs: [deploy-prod, vars] - # runs-on: ubuntu-latest - # permissions: - # packages: write - # strategy: - # matrix: - # package: [migrations, backend, frontend] - # timeout-minutes: 1 - # steps: - # - uses: shrink/actions-docker-registry-tag@v4 - # with: - # registry: ghcr.io - # repository: ${{ github.repository }}/${{ matrix.package }} - # target: ${{ needs.vars.outputs.pr }} - # tags: prod + deploy-prod: + name: Deploy (prod) + needs: [init, deploy-test] + secrets: inherit + uses: ./.github/workflows/.deploy.yml + with: + environment: prod + tag: ${{ needs.init.outputs.pr }} + target: prod + + promote: + name: Promote Images + needs: [init, deploy-prod] + runs-on: ubuntu-latest + strategy: + matrix: + package: [minio, database, backend, frontend] + steps: + - uses: shrink/actions-docker-registry-tag@v4 + with: + registry: ghcr.io + repository: ${{ github.repository }}/${{ matrix.package }} + target: ${{ needs.vars.outputs.pr }} + tags: prod From 443f4ac0f9bfdfb94db9589ca982996bf529710c Mon Sep 17 00:00:00 2001 From: "Fergus MacConnell WLRS:EX" Date: Tue, 26 Nov 2024 13:23:21 -0800 Subject: [PATCH 2/2] Pluralize deploy job names. --- .github/workflows/merge.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index fe66f6ddc..df8c168a9 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -33,7 +33,7 @@ jobs: id: pr uses: bcgov-nr/action-get-pr@v0.0.1 - deploy-test: + deploys-test: name: TEST Deploys (${{ needs.init.outputs.pr }}) needs: [init] secrets: inherit @@ -43,9 +43,9 @@ jobs: tag: ${{ needs.init.outputs.pr }} target: test - deploy-prod: + deploys-prod: name: Deploy (prod) - needs: [init, deploy-test] + needs: [init, deploys-test] secrets: inherit uses: ./.github/workflows/.deploy.yml with: @@ -55,7 +55,7 @@ jobs: promote: name: Promote Images - needs: [init, deploy-prod] + needs: [init, deploys-prod] runs-on: ubuntu-latest strategy: matrix: