-
Bug
-
Resolution: Unresolved
-
Minor
-
None
We have a ci job with two SCMs (X and Y), using ghprb for X. When triggering the build from a github PR in X, the job launched tries to use $sha1 for both X and Y. However, the refspec does not exist in Y, so the job fails.
If I rebuild the job with the same parameters, the job runs successfully.
The output of the failed job is
GitHub pull request #4 of commit c47c3b279270f6dcc5a816d284ea6958c302bd0e automatically merged. [EnvInject] - Loading node environment variables. Building remotely on jenkins-node (<node-specs>) in workspace /Users/jenkins/jenkins/workspace/jenkins-job > git rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository > git config remote.origin.url http://github.example.com/X.git # timeout=10 Fetching upstream changes from http://github.example.com/X.git > git --version # timeout=10 using .gitcredentials to set credentials [WARNING] Installed git version too old for credentials support > git config --local credential.helper store --file=/var/folders/zz/4ffrsh1s5vb18wn558p9bw4w001tpw/T/git631545209836814515.credentials # timeout=10 > git fetch --tags --progress http://github.example.com/X.git +refs/pull/*:refs/remotes/origin/pr/* > git config --local --remove-section credential # timeout=10 > git rev-parse origin/pr/4/merge^{commit} # timeout=10 Checking out Revision 3b14f8b24999b5e5570d8a07fedd050879122f82 (detached) > git config core.sparsecheckout # timeout=10 > git checkout -f 3b14f8b24999b5e5570d8a07fedd050879122f82 First time build. Skipping changelog. Cleaning workspace > git rev-parse --verify HEAD # timeout=10 Resetting working tree > git reset --hard # timeout=10 > git clean -fdx # timeout=10 > git rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository > git config remote.origin.url http://github.example.com/Y.git # timeout=10 Fetching upstream changes from http://github.example.com/Y.git > git --version # timeout=10 > git fetch --tags --progress http://github.example.com/Y.git +refs/heads/*:refs/remotes/origin/* > git rev-parse origin/pr/4/merge^{commit} # timeout=10 FATAL: Command "git rev-parse origin/pr/4/merge^{commit}" returned status code 128: stdout: origin/pr/4/merge^{commit}
The output of the rebuild job looks the same way, except for repo Y it downloads master and succeeds.
Any suggestions on what might be wrong?