Skip to content

Commit

Permalink
chore: disable unneeded workflows (#10)
Browse files Browse the repository at this point in the history
* chore: disable tests workflow

* chore: disable prod deployment due to limited compute resources

* chore: disable scheduled zap scans
  • Loading branch information
MikeLyttle authored Nov 29, 2024
1 parent 9d87f06 commit 2b8aa06
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 70 deletions.
68 changes: 34 additions & 34 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
16 changes: 8 additions & 8 deletions .github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
56 changes: 28 additions & 28 deletions .github/workflows/scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,34 +60,34 @@ jobs:
uses: bcgov/quickstart-openshift-helpers/.github/workflows/[email protected]


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/[email protected]
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/[email protected]
# 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/[email protected]
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/[email protected]
# with:
# allow_issue_writing: true
# artifact_name: "zap_frontend"
# cmd_options: "-a"
# issue_title: "ZAP: Frontend"
# target: https://${{ env.PREFIX }}-frontend.${{ env.DOMAIN }}

0 comments on commit 2b8aa06

Please sign in to comment.