-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
jenkins: 2.19.4
workflow-job: 2.9
The implementation of WorkflowJob.getSCMs() is troublesome. It uses the latest completed build to determine the SCM resource. Normally this works fine, however, if the last completed build has failed before all SCM resources was checked out, then none or not all SCM resources are returned. This is quite common for us since we, from time to time, have network problems and the SCM checkout step fails.
So, I therefor suggest that getSCMs() first check if getLastSuccessfulBuild() returns a build, if not fall back by using getLastCompletedBuild().
This behaviour is also more inline with WorkflowJob.poll() where it first check for a successful build.
- is duplicated by
-
JENKINS-41652 Build only triggered by post-commit-hook if previous build was stable
-
- Resolved
-
- relates to
-
JENKINS-32214 Workflow and svn polling
-
- Resolved
-
- links to
Code changed in jenkins
User: jon
Path:
src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowJob.java
http://jenkins-ci.org/commit/workflow-job-plugin/0b04f3d9fb2c00768b0d97eadf2a44023c75c0e8
Log:
JENKINS-40255Changed behavior for WorkflowJob.getSCMs(), not it checks for successful build first.