-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
Windows 10
Jenkins 2.277.1
jenkinsfile
(As always, I have no idea what component to select. Why do you ask an lay person like me to pick a component? Only a Jenkins developer knows what components there are and how to assign to one.)
The issue I'm having is the same (or very similar) to JENKINS-42971 and JENKINS-28447. Both are marked resolved. But happens for me and I'm using latest version of Jenkins.
As described in 42971 I have param named GIT_BRANCH and for the git repo setup I have the branch set to ${GIT_BRANCH}. Without lightweight checkout, this works as I want; the branch specified by the parameter value is checked out. But, with lightweight checkout selected, it tries to checkout branch "${GIT_BRANCH}" which is not what I want nor does it exist.
We are having the same issue and this causing underlying other problems because we have many pipelines against a mono repo and the workspace directory on the controller has become massive while we only need the jenkinsfile.
We have a custom shell wrapper to address other issues with the Git plugin and we did try to expand ${GIT_BRANCH} but that is not available in the environment variables so this cannot be fixed without fixing either the plugin that managed the Lightweight Checkout checkbox or the Git plugin. At scale this is causing a significant amount of useless CPU, RAM and io load.
markewaite I see that there are several similar issues with the environment variables not being expanded properly. Is this something that is likely to be fixed in the short term?