Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Won't Fix
-
None
Description
Right now when the build is aborted using the `pipeline-input-step` plugin in a declarative pipeline, the build result is set to `FAILURE` instead of `ABORTED` in the post section. However, the actual result is properly set to `ABORTED` afterwards. This makes it impossible to do conditional code in the post section.
Attachments
Issue Links
- is duplicated by
-
JENKINS-46572 Not expected behaviour for Post section of DSL pipeline in case of abort
-
- Closed
-
-
JENKINS-43895 Possibility to avoid postBuild notification on Aborted build
-
- Closed
-
- links to
abayer I've observed the following:
When running parallel steps with fastFail set, the fast-failed aborted build will return FAILURE if the act of aborting a step that was still in progress returns an error code.
However if other parallel steps have finished successfully, and the last running step fails, this correctly returns ABORTED in the event of failure.
Some kind of race condition where if a step fails, fastFail aborts all other steps, and the last error code returned is the status seen by the declarative pipeline, but isn't the one respected by the overall build.status? Hopefully that makes sense.