-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
-
workflow-basic-steps 2.19, pipeline-build-step 2.11, workflow-step-api 2.22
We just upgraded pipeline-build-step from 2.9 to 2.10. The following no longer retries:
pipeline { agent any stages { stage('bug') { steps { retry(3) { echo 'in the retry loop' //throw new Exception('failing in retry loop') // This runs (when uncommented) several times before the pipeline exits with failure. build(job: 'some/job/that/fails', propagate: true) // This only runs once before the pipeline exits with failure. } } } } }
When the sub-build fails, the retry loop exits immediately and does not retry. This didn't used to happen. When raising an error in another way (e.g. the `throw new Exception`, commented out, in the code above), `retry` works as expected.
A workaround is to try/catch the `build()` call and, in catch, `throw new Exception(...)`. If the caught exception is directly re-thrown, we see the same behavior where `retry` does not loop.
- is caused by
-
JENKINS-49073 build job propagate true propagates FAIL when state is UNSTABLE
-
- Resolved
-
- relates to
-
JENKINS-44379 workflow-basic-steps: retry does not abort when input or milestone try to abort build
-
- Resolved
-
-
JENKINS-51454 Pipeline retry operation doesn't retry when there is a timeout inside of it
-
- Resolved
-
-
JENKINS-67067 Cancelling of concurrent pipeline run due to milestone wrongly claims that user aborted via FlowInterruptedException#actualInterruption
-
- Closed
-
- links to
[JENKINS-60354] Updated pipeline build step does not work with retry, catchError, or warnError
Description |
Original:
We just upgraded pipeline-build-step from 2.9 to 2.10. The following no longer retries: {code} pipeline { agent any stages { stage('bug') { steps { retry(3) { echo 'in the retry loop' //throw new Exception('failing in retry loop') // This runs (when uncommented) several times before the pipeline exits with failure. build(job: 'some/job/that/fails', propagate: true) // This only runs once before the pipeline exits with failure. } } } } } {code} When the sub-build fails, the retry loop exits immediately and does not retry. This didn't used to happen. When raising an error in another way (e.g. the `throw new Exception`, commented out, in the code above), `retry` works as expected. |
New:
We just upgraded pipeline-build-step from 2.9 to 2.10. The following no longer retries: {code} pipeline { agent any stages { stage('bug') { steps { retry(3) { echo 'in the retry loop' //throw new Exception('failing in retry loop') // This runs (when uncommented) several times before the pipeline exits with failure. build(job: 'some/job/that/fails', propagate: true) // This only runs once before the pipeline exits with failure. } } } } } {code} When the sub-build fails, the retry loop exits immediately and does not retry. This didn't used to happen. When raising an error in another way (e.g. the `throw new Exception`, commented out, in the code above), `retry` works as expected. A workaround is to try/catch the `build()` call and, in catch, `throw new Exception(...)`. If the caught exception is directly re-thrown, we see the same behavior where `retry` does not loop. |
Link |
New:
This issue is caused by |
Link |
New:
This issue is caused by |
Link |
Original:
This issue is caused by |
Link |
New:
This issue relates to |
Link |
New:
This issue is caused by |
Link |
Original:
This issue is caused by |
Remote Link | New: This issue links to "Discussion of potential fixes (Web Link)" [ 24103 ] |
Summary | Original: Updated pipeline build step does not work with retry | New: Updated pipeline build step does not work with retry, catchError, or warnError |
Remote Link | New: This issue links to "jenkinsci/workflow-step-api-plugin#51 (Web Link)" [ 24116 ] |