-
Improvement
-
Resolution: Duplicate
-
Major
-
None
pipeline { agent any stages { stage ('Build & Test') { steps { sh 'echo Building... Failure here will fail the build' script { try { echo 'Running tests...' sh 'exit 1' } catch (exc) { echo 'Testing failed!' currentBuild.result = 'UNSTABLE' } } } } } }
E.g. as described here https://lastviking.eu/how_to_set_result_as_unstable_from_declarative_pipeline.html
It would be nice to have a way to set result to unstable without having to use `script` or a framework specific publisher plugin (e.g. junit plugin)
- duplicates
-
JENKINS-39203 All stages show up as UNSTABLE when only one stage should
- Resolved