Skip to content

Commit

Permalink
Fix: ZAP scheduled job (#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekRoberts authored Feb 1, 2024
1 parent d603780 commit 632da10
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 13 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/merge-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ jobs:
oc_server: ${{ secrets.OC_SERVER }}
oc_token: ${{ secrets.OC_TOKEN }}
overwrite: false
penetration_test: false
parameters: -p ZONE=${{ env.ZONE }} -p NAME=${{ github.event.repository.name }}

deploy-test-backend:
Expand All @@ -106,7 +105,6 @@ jobs:
oc_server: ${{ secrets.OC_SERVER }}
oc_token: ${{ secrets.OC_TOKEN }}
overwrite: true
penetration_test: true
parameters:
-p ZONE=${{ env.ZONE }} -p NAME=${{ github.event.repository.name }}
-p PROMOTE=${{ github.repository }}/backend:${{ env.ZONE }}
Expand Down Expand Up @@ -137,7 +135,6 @@ jobs:
oc_server: ${{ secrets.OC_SERVER }}
oc_token: ${{ secrets.OC_TOKEN }}
overwrite: false
penetration_test: false
parameters: -p ZONE=${{ env.ZONE }} -p NAME=${{ github.event.repository.name }}

deploy-prod-backend:
Expand All @@ -159,7 +156,6 @@ jobs:
oc_server: ${{ secrets.OC_SERVER }}
oc_token: ${{ secrets.OC_TOKEN }}
overwrite: true
penetration_test: true
parameters:
-p ZONE=${{ env.ZONE }} -p NAME=${{ github.event.repository.name }}
-p PROMOTE=${{ github.repository }}/backend:${{ env.PREV }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Pull Request

on:
pull_request:
workflow_dispatch:

concurrency:
# PR open and close use the same group, allowing only one at a time
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/scheduled.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Scheduled

on:
schedule: [cron: "0 11 * * 6"] # 3 AM PST = 12 PM UDT, Saturdays
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
zap_scan:
runs-on: ubuntu-latest
name: Penetration Tests
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://${{ github.event.repository.name }}-test-backend.apps.silver.devops.gov.bc.ca
11 changes: 2 additions & 9 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,9 @@ name: Unit Tests and Analysis

on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
types: [opened, reopened, synchronize, ready_for_review, converted_to_draft]
push:
branches:
- main
paths-ignore:
- "**.md"
branches: [main]
workflow_dispatch:

concurrency:
Expand Down

0 comments on commit 632da10

Please sign in to comment.