Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix acceptance tests & add notification upon failures #204

Merged
merged 1 commit into from
Oct 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 37 additions & 1 deletion .github/workflows/acceptance-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,15 @@ jobs:
name: artifacts
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
Acceptance-Linux:
needs: [ Build-Snapshot-Artifacts ]
Expand All @@ -80,6 +89,15 @@ jobs:
- name: Run Acceptance Tests (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
Acceptance-Mac:
needs: [ Build-Snapshot-Artifacts ]
Expand All @@ -96,6 +114,15 @@ jobs:
- name: Run Acceptance Tests (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
Inline-Compare:
needs: [ Build-Snapshot-Artifacts ]
Expand All @@ -120,4 +147,13 @@ jobs:
path: snapshot

- 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() }}
2 changes: 1 addition & 1 deletion test/acceptance/deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ docker run --rm \
ubuntu:latest \
/bin/bash -x -c "\
DEBIAN_FRONTEND=noninteractive apt install ${DISTDIR}/syft_*_linux_amd64.deb -y && \
syft version -v && \
syft version && \
syft ${TEST_IMAGE} -vv -o json > ${REPORT} \
"

Expand Down
2 changes: 1 addition & 1 deletion test/acceptance/mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ ls -alh ${TEST_IMAGE_TAR}

# run 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}

# keep the generated report around
Expand Down
2 changes: 1 addition & 1 deletion test/acceptance/rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ docker run --rm \
centos:latest \
/bin/bash -x -c "\
rpm -ivh ${DISTDIR}/syft_*_linux_amd64.rpm && \
syft version -v && \
syft version && \
syft ${TEST_IMAGE} -vv -o json > ${REPORT} \
"

Expand Down