Contain a Non-Critical Failure
Mark an optional stage unstable while allowing required stages to continue.
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: An optional audit file is sometimes absent, but that must not suppress the required test run.
Requirements:
- Wrap the audit shell step with
catchError - Set the stage result to
UNSTABLE - Keep the overall build result
SUCCESS - Confirm Test still runs and the callback completes