Skip to content

Commit

Permalink
add more helpful wording around quality gate evaluations (#108)
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
  • Loading branch information
wagoodman committed Mar 9, 2023
1 parent 4a416ad commit 73c56bb
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/pr-quality-gate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,18 @@ jobs:
steps:
- run: |
echo "Validations Status: ${{ needs.validate-provider.result }}"
echo "Providers Changed: ${{ needs.select-providers.outputs.providers }}"
echo "Providers that require testing: ${{ needs.select-providers.outputs.providers }}"
echo
if [ '${{ needs.select-providers.outputs.providers }}' == '[]' ]; then
echo "Quality gate not required: no providers changed"
echo "🟢 Quality gate passed! (no providers changed)"
exit 0
fi
if [ "${{ needs.validate-provider.result }}" != "success" ]; then
echo "Quality gate failed!"
echo "🔴 Quality gate FAILED! 😭"
echo
echo "This could happen for a couple of reasons:"
echo " - A provider test failed, in which case see the logs in previous jobs for more details"
echo " - A required provider test was skipped. You might need to add the 'run-pr-quality-gate' label to your PR to prevent skipping the test.
exit 1
fi
echo "Quality gate passed!"
echo "🟢 Quality gate passed! (all tests passed)"

0 comments on commit 73c56bb

Please sign in to comment.