mirror of
https://github.com/anchore/syft.git
synced 2025-11-18 00:43:20 +01:00
fix acceptance tests & add notification upon failures (#204)
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
parent
1be5f5756a
commit
da0eb6f20f
38
.github/workflows/acceptance-test.yaml
vendored
38
.github/workflows/acceptance-test.yaml
vendored
@ -64,6 +64,15 @@ jobs:
|
|||||||
name: artifacts
|
name: artifacts
|
||||||
path: snapshot/**/*
|
path: snapshot/**/*
|
||||||
|
|
||||||
|
- uses: 8398a7/action-slack@v3
|
||||||
|
with:
|
||||||
|
status: ${{ job.status }}
|
||||||
|
fields: repo,workflow,job,commit,message,author
|
||||||
|
text: The syft acceptance tests have failed tragically!
|
||||||
|
env:
|
||||||
|
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_TOOLBOX_WEBHOOK_URL }}
|
||||||
|
if: ${{ failure() }}
|
||||||
|
|
||||||
# Note: changing this job name requires making the same update in the .github/workflows/release.yaml pipeline
|
# Note: changing this job name requires making the same update in the .github/workflows/release.yaml pipeline
|
||||||
Acceptance-Linux:
|
Acceptance-Linux:
|
||||||
needs: [ Build-Snapshot-Artifacts ]
|
needs: [ Build-Snapshot-Artifacts ]
|
||||||
@ -80,6 +89,15 @@ jobs:
|
|||||||
- name: Run Acceptance Tests (Linux)
|
- name: Run Acceptance Tests (Linux)
|
||||||
run: make acceptance-linux
|
run: make acceptance-linux
|
||||||
|
|
||||||
|
- uses: 8398a7/action-slack@v3
|
||||||
|
with:
|
||||||
|
status: ${{ job.status }}
|
||||||
|
fields: repo,workflow,job,commit,message,author
|
||||||
|
text: The syft acceptance tests have failed tragically!
|
||||||
|
env:
|
||||||
|
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_TOOLBOX_WEBHOOK_URL }}
|
||||||
|
if: ${{ failure() }}
|
||||||
|
|
||||||
# Note: changing this job name requires making the same update in the .github/workflows/release.yaml pipeline
|
# Note: changing this job name requires making the same update in the .github/workflows/release.yaml pipeline
|
||||||
Acceptance-Mac:
|
Acceptance-Mac:
|
||||||
needs: [ Build-Snapshot-Artifacts ]
|
needs: [ Build-Snapshot-Artifacts ]
|
||||||
@ -96,6 +114,15 @@ jobs:
|
|||||||
- name: Run Acceptance Tests (Mac)
|
- name: Run Acceptance Tests (Mac)
|
||||||
run: make acceptance-mac
|
run: make acceptance-mac
|
||||||
|
|
||||||
|
- uses: 8398a7/action-slack@v3
|
||||||
|
with:
|
||||||
|
status: ${{ job.status }}
|
||||||
|
fields: repo,workflow,job,commit,message,author
|
||||||
|
text: The syft acceptance tests have failed tragically!
|
||||||
|
env:
|
||||||
|
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_TOOLBOX_WEBHOOK_URL }}
|
||||||
|
if: ${{ failure() }}
|
||||||
|
|
||||||
# Note: changing this job name requires making the same update in the .github/workflows/release.yaml pipeline
|
# Note: changing this job name requires making the same update in the .github/workflows/release.yaml pipeline
|
||||||
Inline-Compare:
|
Inline-Compare:
|
||||||
needs: [ Build-Snapshot-Artifacts ]
|
needs: [ Build-Snapshot-Artifacts ]
|
||||||
@ -120,4 +147,13 @@ jobs:
|
|||||||
path: snapshot
|
path: snapshot
|
||||||
|
|
||||||
- name: Compare Anchore inline-scan results against snapshot build output
|
- name: Compare Anchore inline-scan results against snapshot build output
|
||||||
run: make compare-snapshot
|
run: make compare-snapshot
|
||||||
|
|
||||||
|
- uses: 8398a7/action-slack@v3
|
||||||
|
with:
|
||||||
|
status: ${{ job.status }}
|
||||||
|
fields: repo,workflow,job,commit,message,author
|
||||||
|
text: The syft acceptance tests have failed tragically!
|
||||||
|
env:
|
||||||
|
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_TOOLBOX_WEBHOOK_URL }}
|
||||||
|
if: ${{ failure() }}
|
||||||
@ -41,7 +41,7 @@ docker run --rm \
|
|||||||
ubuntu:latest \
|
ubuntu:latest \
|
||||||
/bin/bash -x -c "\
|
/bin/bash -x -c "\
|
||||||
DEBIAN_FRONTEND=noninteractive apt install ${DISTDIR}/syft_*_linux_amd64.deb -y && \
|
DEBIAN_FRONTEND=noninteractive apt install ${DISTDIR}/syft_*_linux_amd64.deb -y && \
|
||||||
syft version -v && \
|
syft version && \
|
||||||
syft ${TEST_IMAGE} -vv -o json > ${REPORT} \
|
syft ${TEST_IMAGE} -vv -o json > ${REPORT} \
|
||||||
"
|
"
|
||||||
|
|
||||||
|
|||||||
@ -38,7 +38,7 @@ ls -alh ${TEST_IMAGE_TAR}
|
|||||||
|
|
||||||
# run syft
|
# run syft
|
||||||
chmod 755 ${DISTDIR}/syft_darwin_amd64/syft
|
chmod 755 ${DISTDIR}/syft_darwin_amd64/syft
|
||||||
${DISTDIR}/syft_darwin_amd64/syft version -v
|
${DISTDIR}/syft_darwin_amd64/syft version
|
||||||
SYFT_CHECK_FOR_APP_UPDATE=0 ${DISTDIR}/syft_darwin_amd64/syft docker-archive://${TEST_IMAGE_TAR} -vv -o json > ${REPORT}
|
SYFT_CHECK_FOR_APP_UPDATE=0 ${DISTDIR}/syft_darwin_amd64/syft docker-archive://${TEST_IMAGE_TAR} -vv -o json > ${REPORT}
|
||||||
|
|
||||||
# keep the generated report around
|
# keep the generated report around
|
||||||
|
|||||||
@ -40,7 +40,7 @@ docker run --rm \
|
|||||||
centos:latest \
|
centos:latest \
|
||||||
/bin/bash -x -c "\
|
/bin/bash -x -c "\
|
||||||
rpm -ivh ${DISTDIR}/syft_*_linux_amd64.rpm && \
|
rpm -ivh ${DISTDIR}/syft_*_linux_amd64.rpm && \
|
||||||
syft version -v && \
|
syft version && \
|
||||||
syft ${TEST_IMAGE} -vv -o json > ${REPORT} \
|
syft ${TEST_IMAGE} -vv -o json > ${REPORT} \
|
||||||
"
|
"
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user