From 8b08db12ef4917d3e5c0b99b6d2da3181415e650 Mon Sep 17 00:00:00 2001 From: Alex Goodman Date: Wed, 27 Sep 2023 10:24:37 -0400 Subject: [PATCH] notify #tools slack channel on quality gate failures (#303) Signed-off-by: Alex Goodman --- .github/workflows/pr-quality-gate.yaml | 9 +++++++++ tests/quality/README.md | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/.github/workflows/pr-quality-gate.yaml b/.github/workflows/pr-quality-gate.yaml index db93bfb6..0e9050f2 100644 --- a/.github/workflows/pr-quality-gate.yaml +++ b/.github/workflows/pr-quality-gate.yaml @@ -97,3 +97,12 @@ jobs: exit 1 fi echo "🟢 Quality gate passed! (all tests passed)" + + - uses: 8398a7/action-slack@fbd6aa58ba854a740e11a35d0df80cb5d12101d8 #v3.15.1 + if: ${{ failure() }} + with: + status: ${{ job.status }} + fields: repo,workflow,action,eventName + text: "Vunnel nightly quality gate has failed: https://github.com/anchore/vunnel/actions/workflows/nightly-quality-gate.yaml" + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_TOOLBOX_WEBHOOK_URL }} diff --git a/tests/quality/README.md b/tests/quality/README.md index f9ebef90..f29fc349 100644 --- a/tests/quality/README.md +++ b/tests/quality/README.md @@ -30,6 +30,14 @@ make validate A pass/fail result is shown in the output with reasons for the failure being listed explicitly. +### But I don't want to run all of the providers... + +While developing it may be useful to only run one provider for rapid troubleshooting. You can do this with: + +``` +make capture provider=github +make validate +``` ## What is the quality gate criteria