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 nightly quality gate notification #324

Merged
merged 1 commit into from
Oct 10, 2023
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
17 changes: 14 additions & 3 deletions .github/workflows/nightly-quality-gate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,21 @@ jobs:
needs: validate-provider
if: ${{ always() && !cancelled() }}
steps:
# based on https://docs.github.com/en/actions/learn-github-actions/contexts#steps-context
# the valid result values are: success, failure, cancelled, skipped
- run: |
echo "Validations Status: ${{ needs.run-provider-validation.result }}"
if [ "${{ needs.run-provider-validation.result }}" == "failure" ]; then
echo "Quality gate failed!"
if [ "${{ needs.run-provider-validation.result }}" != "success" ]; then
echo "🔴 Quality gate FAILED! 😭"
exit 1
fi
echo "Quality gate passed!"
echo "🟢 Quality gate 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 }}
9 changes: 0 additions & 9 deletions .github/workflows/pr-quality-gate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,3 @@ 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 }}
Loading