-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
Jenkins LTS on Debian Wheezy
Git client plugin 1.10.2
Git plugin 2.2.6
We have a matrix project configured to merge a git feature branch onto the master before starting the build. The exact configuration is attached as screenshot. The documentation for the "Name of repository" oarameter of the "Merge before build" behavior states that:
If left blank, it'll default to the name of the first repository configured above.
However, when leaving this field empty, you receive the following output when triggering the build:
Started by an SCM change Building remotely on ubuntu_trusty_64bit (trusty gcc ubuntu-next java7 ubuntu linux 64bit) in workspace /home/jenkins/workspace/rsb-cpp-trunk-merge-simulator selected Git installation does not exists. Using Default Wiping out workspace first. Cloning the remote Git repository Cloning repository https://code.cor-lab.org/git/rsb.git.cpp > git init /home/jenkins/workspace/rsb-cpp-trunk-merge-simulator # timeout=10 Fetching upstream changes from https://code.cor-lab.org/git/rsb.git.cpp > git --version # timeout=10 > git fetch --tags --progress https://code.cor-lab.org/git/rsb.git.cpp +refs/heads/*:refs/remotes/origin/* > git config remote.origin.url https://code.cor-lab.org/git/rsb.git.cpp # timeout=10 > git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10 > git config remote.origin.url https://code.cor-lab.org/git/rsb.git.cpp # timeout=10 Fetching upstream changes from https://code.cor-lab.org/git/rsb.git.cpp > git fetch --tags --progress https://code.cor-lab.org/git/rsb.git.cpp +refs/heads/*:refs/remotes/origin/* Seen branch in repository origin/0.10 Seen branch in repository origin/0.3 Seen branch in repository origin/0.4 Seen branch in repository origin/0.5 Seen branch in repository origin/0.6 Seen branch in repository origin/0.7 Seen branch in repository origin/0.9 Seen branch in repository origin/agni Seen branch in repository origin/bug-1285 Seen branch in repository origin/enhancement-1096 Seen branch in repository origin/enhancement-1757 Seen branch in repository origin/enhancement-2034 Seen branch in repository origin/master Seen branch in repository origin/wip-introspection Seen branch in repository origin/wip-rosetta Seen branch in repository origin/wip-static-participants Seen 16 remote branches Multiple candidate revisions Scheduling another build to catch up with rsb-cpp-trunk-merge-simulator Merging Revision 70a3fd1f2425cdc779d83314c6978955979e9237 (origin/enhancement-1757) onto /master using default strategy > git rev-parse /master^{commit} # timeout=10 FATAL: Command "git rev-parse /master^{commit}" returned status code 128: stdout: /master^{commit} stderr: fatal: ambiguous argument '/master^{commit}': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]' hudson.plugins.git.GitException: Command "git rev-parse /master^{commit}" returned status code 128: stdout: /master^{commit} stderr: fatal: ambiguous argument '/master^{commit}': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]' at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1437) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1413) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1409) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1112) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1122) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:518) at hudson.plugins.git.GitAPI.revParse(GitAPI.java:257) at sun.reflect.GeneratedMethodAccessor58.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:309) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:290) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:249) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:328) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)
The workaround here is to add "origin" to the "Name of repository". Something changes in the recent version of the plugin that created this issue. Before our recent upgrade, it was working properly.