-
Bug
-
Resolution: Duplicate
-
Minor
-
None
When the Mercurial branches of a Multibranch Pipeline are scanned, the process fails as soon as it encounters a branch without Jenkinsfile.
Found branch DEV-7809
[6B4A5EC987D6027EDFBDA91651F37461FD5E7A9D-federation] $ /usr/local/bin/hg locate -r b4361d13b1ade9152bae9869ee4cfb8c5ac936af -I path:Jenkinsfile
‘Jenkinsfile’ found
Met criteria
Did not schedule build for branch: DEV-7809
Found branch r7.4.8
[6B4A5EC987D6027EDFBDA91651F37461FD5E7A9D-federation] $ /usr/local/bin/hg locate -r afd44e0ab2ea0a567d0262f564bf539115382e3c -I path:Jenkinsfile
ERROR: Failed to run /usr/local/bin/hg locate -r afd44e0ab2ea0a567d0262f564bf539115382e3c -I path:Jenkinsfile
ERROR: [Thu Apr 06 17:03:24 CEST 2017] Could not fetch branches from source c126a45a-60c0-4415-9a08-e6f4d590560e
hudson.AbortException
at hudson.plugins.mercurial.HgExe.popen(HgExe.java:425)
at hudson.plugins.mercurial.MercurialSCMSource$1.stat(MercurialSCMSource.java:150)
at org.jenkinsci.plugins.workflow.multibranch.WorkflowBranchProjectFactory$1.isHead(WorkflowBranchProjectFactory.java:52)
at hudson.plugins.mercurial.MercurialSCMSource.retrieve(MercurialSCMSource.java:176)
at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:300)
at jenkins.scm.api.SCMSource.fetch(SCMSource.java:210)
at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:628)
at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:266)
at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:162)
at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:967)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:405)
[Thu Apr 06 17:03:24 CEST 2017] Finished branch indexing. Indexing took 12 sec
FATAL: null
Finished: FAILURE
It fails on:
ERROR: Failed to run /usr/local/bin/hg locate -r afd44e0ab2ea0a567d0262f564bf539115382e3c -I path:Jenkinsfile
Presumably this happens because hg locate returns an error code, and the code does not expect this. This could be because a similar command for Git does not return an error code.
- duplicates
-
JENKINS-42278 Branch indexing failing on MultiBranch Pipeline when at least one branch has no Jenkinsfile
-
- Resolved
-