[JIRA] (JENKINS-62019) Parameter is not interpreted in GIT Plugin - Branch Specifier

7 views
Skip to first unread message

mark.earl.waite@gmail.com (JIRA)

unread,
Apr 22, 2020, 6:53:03 PM4/22/20
to jenkinsc...@googlegroups.com
Mark Waite moved an issue
 
Jenkins / Bug JENKINS-62019
Parameter is not interpreted in GIT Plugin - Branch Specifier
Change By: Mark Waite
Project: Infrastructure Jenkins
Key: INFRA JENKINS - 2588 62019
Workflow: classic default workflow JNJira + In-Review
Component/s: git-plugin
Component/s: ci.jenkins.io
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

aburdajewicz@cloudbees.com (JIRA)

unread,
May 7, 2020, 11:25:03 PM5/7/20
to jenkinsc...@googlegroups.com
Allan BURDAJEWICZ commented on Bug JENKINS-62019
 
Re: Parameter is not interpreted in GIT Plugin - Branch Specifier

This happens because tags are now supported at https://github.com/jenkinsci/git-plugin/blob/git-4.2.1/src/main/java/jenkins/plugins/git/GitSCMFileSystem.java#L262-L264. But when the GitSCMFileSystem is used, the branch specified is not expanded. If you remove that support, it works again.

We can see that all those duplicates are about refs/tags and not refs/heads and the *lightweight checkout* (i.e. GitSCMFileSystem). If you try a parameterized refs/heads/ like for example refs/heads/$BRANCH you will notice that it does not work with either version 4.1.1 or 4.2.2.

People are impact because now lightweight checkout supports tags, lightweight checkout is enabled by default, but the current implementation of the lightweight checkout does not expand variables.

The workaround is to disable lightweight checkout if you use refs/tags.

The fix is to support variable expansion of the branch specifier in GitSCMFileSystem.

Reply all
Reply to author
Forward
0 new messages