Skip to content

Commit

Permalink
feat: add "end" job to workflows expected to fail
Browse files Browse the repository at this point in the history
  • Loading branch information
clay-lake committed Dec 2, 2024
1 parent ae90815 commit cfdf377
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/build_and_test_eicar_rock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,19 @@ jobs:
test:
uses: canonical/oci-factory/.github/workflows/Test-Rock.yaml@main
needs: [build]
continue-on-error: true # we expect malware scan to fail
with:
oci-archive-name: "eicar-rock"
test-black-box: true
test-efficiency: true
test-malware: true
test-oci-compliance: true
test-vulnerabilities: true

end:
# we expect malware scan to fail, so we add a final job so PR checks pass.
if: ${{ !cancelled() }}
needs: [test]
runs-on: ubuntu-22.04
steps:
- run: |
echo Workflow complete!
10 changes: 9 additions & 1 deletion .github/workflows/test_external_rock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,19 @@ jobs:
test:
uses: canonical/oci-factory/.github/workflows/Test-Rock.yaml@main
needs: [setup]
continue-on-error: true # we expect vulnerabilities scan to fail
with:
oci-archive-name: test_image
test-black-box: false # will always fail since bkimminich/juice-shop is not a rock.
test-efficiency: true
test-malware: true
test-oci-compliance: true
test-vulnerabilities: true

end:
# we expect vulnerabilities scan to fail, so we add a final job so PR checks pass.
if: ${{ !cancelled() }}
needs: [test]
runs-on: ubuntu-22.04
steps:
- run: |
echo Workflow complete!

0 comments on commit cfdf377

Please sign in to comment.