-
Bug
-
Resolution: Unresolved
-
Minor
-
Most versions of pipeline stage view, probably.
If you use try/catch around a stage, the stage can fail and will be shown as a failure and the pipeline will still proceed (correct). Unfortunately the following stages aren't displayed correctly for purposes of pass/fail state.
Sample job that will reproduce this:
try { stage('failFirst') { error('Fail') } } catch (Exception ex) { } try { stage('failSecond') { error('Fail') } } catch (Exception ex) { } stage('passOrFail') { echo 'run' }
ALTERNATELY If the build fails overall:
try { stage('failFirst') { error('Fail') } } catch (Exception ex) { } try { stage('failSecond') { error('Fail') } } catch (Exception ex) { } stage('passOrFail') { echo 'run' } currentBuild.result = 'FAILURE'
Screenshot:
Note that in both cases, the last stage should probably be a passing stage.
This is probably fixable by UI template and/or CSS.