jenkinsci / jenkinsci/branch-api-plugin
[JENKINS-65299] Lightweight checkout breaks variable expansion for GIT branch
- Dominant language
- Java
- Stars
- 39
- Forks
- 154
- PR merge metrics
- No merged PRs in 30d
Description
(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">JENKINS-42971 and JENKINS-28447">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.
---
Originally reported by
sbroshar, imported from: Lightweight checkout breaks variable expansion for GIT branch
Raw content of original issue
(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-42971andJENKINS-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.
environment
```
Windows 10
Jenkins 2.277.1
jenkinsfile
```
Contributor guide
Research direction
Start with the branch-api-plugin lightweight-checkout behavior described in the issue and compare it with the non-lightweight checkout behavior. Reproduce the Jenkinsfile case using a GIT_BRANCH parameter and a branch value of ${GIT_BRANCH}; done means the lightweight path expands the parameter and checks out the requested branch rather than the literal expression.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, java
- Domain
- backend, ci-cd
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100