I have a series of stages that perform quick checks. I want to perform them all, even if there are failures. For example:
stage('one') {
node {
sh 'exit 0'
}
}
stage('two') {
node {
sh 'exit 1' // failure
}
}
stage('three') {
node {
sh 'exit 0'
}
}
Stage two
fails, so by default stage three
is not executed.
Ordinarily this would be a job for parallel
, but I want to display them in the stage view. In the mock up below:
- Build #4 shows what normally happens. Job
two
fails sothree
does not run. - I Photoshopped Build #6 to show what I would like to see. Job
two
fails and is displayed as such, butthree
still runs. The real Jenkins would probably display the entire Build #6 tinged slightly red, which is of course fine.
catchError
which also will mark the build red in case of exception. – izzekiltwo
from stopping the pipeline, but now stagetwo
is marked as successful--it is green even though it actually failed. – John McGeheecurrentStage
as requested in JENKINS-36087 (superseded by JENKINS-26522). – John McGehee