-
Bug
-
Resolution: Duplicate
-
Major
-
Jenkins 2.46.2
-
-
Pipeline - December
I'm experiencing an issue with Blue Ocean and Stage View where a failure in the archiveArtifacts step of a pipeline correctly changes the build result variable to FAILURE; however, this does not provide Blue Ocean or Stage View with any way of determining that it failed. As far as I'm aware, these UI plugins use thrown exceptions to locate failed steps in a pipeline? If so, the archiveArtifacts step (and possibly others) should also throw exceptions instead of just updating the build result.
A pipeline script to reproduce the behaviour:
stage("archive-test") { node { archiveArtifacts "DoesNotExist/*" } }
- duplicates
-
JENKINS-47142 archiveArtifacts step failure is not displayed
-
- Resolved
-
- is duplicated by
-
JENKINS-48371 archiveArtifacts fail but display correct output on UI
-
- Closed
-
If a step fails, Pipeline internals will add an ErrorAction to that FlowNode. The rest is up to visualizations. If you are referring to a call to Run.setResult, without actually failing the step, that it entirely outside the control of Pipeline and there is no way to reconstruct when it happened. In
JENKINS-38005I asked abayer to follow up with the deletion of the whole try-block and use of AbortException, but nothing happened; possibly making those simplifications in core would solve the issue, in which case this is a core issue.