-
Bug
-
Resolution: Fixed
-
Major
-
Jenkins 1.594
Plugins:
git 2.3.4 true false
git-client 1.15.0 true false
When setting up jenkins to clone a git repo the branch specifier is recommended: The safest way is to use the refs/heads/<branchName> syntax. This way the expected branch is unambiguous.
However it fails to checkout the workspace if the full branchname is used. :
quote
15:27:24 Started by an SCM change
15:27:24 Building remotely on ip-172-31-10-241.us-west-1.compute.internal (swarm buildslave) in workspace /home/jenkins-slave/workspace/Idev_euslisp_ubuntu_trusty_amd64
15:27:24 > git rev-parse --is-inside-work-tree # timeout=10
15:27:24 Fetching changes from the remote Git repository
15:27:24 > git config remote.origin.url https://github.com/tork-a/euslisp-release.git # timeout=10
15:27:24 Fetching upstream changes from https://github.com/tork-a/euslisp-release.git
15:27:24 > git --version # timeout=10
15:27:24 > git -c core.askpass=true fetch --tags --progress https://github.com/tork-a/euslisp-release.git +refs/heads/:refs/remotes/origin/
15:27:24 > git rev-parse refs/head/release/indigo/euslisp^
15:27:24 > git rev-parse refs/remotes/origin/refs/head/release/indigo/euslisp^{commit}
# timeout=10
15:27:24 > git rev-parse refs/head/release/indigo/euslisp^
# timeout=10
15:27:24 ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
quote
To make this work the rev-parse needs the shortened refspec or to pass through exactly what is passed to it.
quote
$ git rev-parse release/indigo/euslisp
445d613f27d3cf28291919f29ccfbe4482082ae5
quote