-
Bug
-
Resolution: Unresolved
-
Blocker
-
Jenkins - v. 2.222.3, Pipeline: Declarative - 1.6.0, Blue ocean - 1.23.0
Hi,
I will attach files with example pipeline for the problems I describe below and screenshots.
We want to setup a job that triggers three downstream jobs with enabled fail fast for only two of them and not the third (if one of the first two fails, others are aborted, but if the third fails we let the other two finish ) - attachment parallel-build-job-pipeline.txt. The way we start doing this if by using catchError block around the third job. This seems to work as expected, but there is a problem when the third job gets aborted by one of the other two failing, then the status of the upstream becomes aborted and not failed. We tested with catchInterruptions = false, but the problem persists. Strangely, when testing with a simpler setup where the build job directive is replaced by simple sleep, then the catchInterruptions works as expected - attachment parallel-sleep-pipeline.txt.
We tried using a try-catch block as a workaround, but as far as I can see there is no way currently to set the status of the stage, so we could see it in Blue Ocean. Try-catch just swallows the errors and sets the status to SUCCESS always.
It would seem a strange if this is the desired behavior and there is no way to achieve this. Please comment here and advise on a way to implement this.
Best Regards,
Mihail