Enforce a Quality Gate
Stop promotion when a measured test threshold is not met.
A intermediate Jenkins challenge worth 10 points. Solve it hands-on in a real Jenkins environment in your browser - no local setup, no fake shells.
The Challenge
Scenario: Deployment proceeds even when the test report contains too few tests.
Requirements:
- Read and parse
reports/test-count.txtinside ascriptblock - Fail with
error 'Quality gate failed'when the count is below 1 - Keep Deploy after the gate
- Run a successful build with the provided count