-
Bug
-
Resolution: Fixed
-
Critical
-
None
Hey o/ ,
If there's an error in some step of the post/always {} block, it seems like this will stop the processing of the post sub-steps.
I put it Critical, but it almost seems like a blocker: this seems a common use case and counter-intuitive, so I hope you'll agree this is not expected/intended.
Typical case:
- I want to always generate some reports (junit, say)
- I want to notify people *only* on failure
If something goes wrong in always, still the failure notification should go out for instance.
Reproduction code:
pipeline { agent { label 'linux' } post { always { echo "ALWAYS THE SUN!!!" junit '**/nonexisting_to_make_this_fail/*.xml' } failure { echo "WE FAILED MISERABLY! I won't be shown because junit step failed above" } } stages { stage('bim') { steps { sh "echo bonjour" sh "exit 1" } } } }
- links to