From 2b8aa067cb0e9112100ea942f9afeaf933523065 Mon Sep 17 00:00:00 2001 From: Mike Lyttle Date: Fri, 29 Nov 2024 11:21:24 -0800 Subject: [PATCH] chore: disable unneeded workflows (#10) * chore: disable tests workflow * chore: disable prod deployment due to limited compute resources * chore: disable scheduled zap scans --- .github/workflows/merge.yml | 68 ++++++++++++++++----------------- .github/workflows/pr-open.yml | 16 ++++---- .github/workflows/scheduled.yml | 56 +++++++++++++-------------- 3 files changed, 70 insertions(+), 70 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 2c2f827..4b25eed 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -56,38 +56,38 @@ jobs: db_user: app tag: ${{ needs.vars.outputs.pr }} - deploy-prod: - name: Deploy (prod) - needs: [deploy-test, vars] - uses: ./.github/workflows/.deployer.yml - secrets: - oc_namespace: ${{ secrets.OC_NAMESPACE }} - oc_token: ${{ secrets.OC_TOKEN }} - with: - environment: prod - db_user: app - tag: ${{ needs.vars.outputs.pr }} - params: - --set backend.deploymentStrategy=RollingUpdate - --set frontend.deploymentStrategy=RollingUpdate - --set global.autoscaling=true - --set frontend.pdb.enabled=true - --set backend.pdb.enabled=true + # deploy-prod: + # name: Deploy (prod) + # needs: [deploy-test, vars] + # uses: ./.github/workflows/.deployer.yml + # secrets: + # oc_namespace: ${{ secrets.OC_NAMESPACE }} + # oc_token: ${{ secrets.OC_TOKEN }} + # with: + # environment: prod + # db_user: app + # tag: ${{ needs.vars.outputs.pr }} + # 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-24.04 - 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 + # promote: + # name: Promote Images + # needs: [deploy-prod, vars] + # runs-on: ubuntu-24.04 + # 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 diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index bb2588e..970cff9 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -39,17 +39,17 @@ jobs: db_user: app-${{github.event.number}} params: --set global.secrets.persist=false - tests: - name: Tests - if: needs.deploys.outputs.triggered == 'true' - needs: [deploys] - uses: ./.github/workflows/.tests.yml - with: - target: ${{ github.event.number }} + # tests: + # name: Tests + # if: needs.deploys.outputs.triggered == 'true' + # needs: [deploys] + # uses: ./.github/workflows/.tests.yml + # with: + # target: ${{ github.event.number }} results: name: PR Results - needs: [builds, deploys, tests] + needs: [builds, deploys] if: always() runs-on: ubuntu-24.04 steps: diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index 4509f47..e9cf8ef 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -60,34 +60,34 @@ jobs: uses: bcgov/quickstart-openshift-helpers/.github/workflows/.schema-spy.yml@v0.9.0 - tests: - name: Tests - uses: ./.github/workflows/.tests.yml - with: - target: test + # tests: + # name: Tests + # uses: ./.github/workflows/.tests.yml + # with: + # target: test # Run sequentially to reduce chances of rate limiting - zap_scan: - runs-on: ubuntu-latest - name: ZAP Scans - env: - DOMAIN: apps.silver.devops.gov.bc.ca - PREFIX: ${{ github.event.repository.name }}-test - steps: - - name: ZAP Scan - uses: zaproxy/action-full-scan@v0.12.0 - with: - allow_issue_writing: true - artifact_name: "zap_backend" - cmd_options: "-a" - issue_title: "ZAP: Backend" - target: https://${{ env.PREFIX }}-frontend.${{ env.DOMAIN }}/api + # zap_scan: + # runs-on: ubuntu-latest + # name: ZAP Scans + # env: + # DOMAIN: apps.silver.devops.gov.bc.ca + # PREFIX: ${{ github.event.repository.name }}-test + # steps: + # - name: ZAP Scan + # uses: zaproxy/action-full-scan@v0.12.0 + # with: + # allow_issue_writing: true + # artifact_name: "zap_backend" + # cmd_options: "-a" + # issue_title: "ZAP: Backend" + # target: https://${{ env.PREFIX }}-frontend.${{ env.DOMAIN }}/api - - name: ZAP Scan - Frontend - uses: zaproxy/action-full-scan@v0.12.0 - with: - allow_issue_writing: true - artifact_name: "zap_frontend" - cmd_options: "-a" - issue_title: "ZAP: Frontend" - target: https://${{ env.PREFIX }}-frontend.${{ env.DOMAIN }} + # - name: ZAP Scan - Frontend + # uses: zaproxy/action-full-scan@v0.12.0 + # with: + # allow_issue_writing: true + # artifact_name: "zap_frontend" + # cmd_options: "-a" + # issue_title: "ZAP: Frontend" + # target: https://${{ env.PREFIX }}-frontend.${{ env.DOMAIN }}