-
Bug
-
Resolution: Not A Defect
-
Major
-
None
-
Windows, git executeable, jenkins 1.643, git-plugin 2.4.1
We try to use the "Branches to build" setting of the GIT plugin with variable substitution.
That it should be possible and work is stated in the inline help for this parameter:
${ENV_VARIABLE} It is also possible to use environment variables. In this case the variables are evaluated and the result is used as described above. E.g. ${TREEISH}, refs/tags/${TAGNAME},...
We have setup our job with the flag "Prepare environment to run" and added following parameter as "Properties Content":
GIT-RELEASE_BRANCH=refs/heads/release/20160113
In the field of "Branches to build" we tried to use
${GIT-RELEASE_BRANCH}
We have also tried
${ENV_GIT-RELEASE_BRANCH}
We can see for a specific build that the parameter is available as "Environment Variable".
The job log looks like this (where the parameter is not replaces by the content):
> D:\git\cmd\git.exe rev-parse "origin/${GIT-RELEASE_BRANCH}^{commit}" # timeout=10 > D:\git\cmd\git.exe rev-parse "${GIT-RELEASE_BRANCH}^{commit}" # timeout=10
We expect, that the variable is replaced by its content and used in the git command invocation.