-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major
-
Component/s: git-plugin
-
None
-
Environment:Jenkins 2.75
git-plugin 3.5.1
Because this was completely breaking my build environment, I was able to track down the issue to the following file: https://github.com/jenkinsci/git-plugin/blob/git-3.5.1/src/main/java/jenkins/plugins/git/AbstractGitSCMSource.java
Broken on sha a4febc060a23740816d660915b9fe0a7a6ffdcf6
Working on sha d7c3ece2553cf0494a56c766f62a6c9f340bbe4c
To get it to work in my environment, I reverted this one file to the previous sha and built the plugin locally. Installed on my Jenkins instance and the issue was fixed.
Â
Issue:
For multibranch projects- not tested on single branch projects
Basically, when listing remotes during branch discovery, it forces the '-h' option for git ls-remotes and ignores any refspec given.
For example, I give the refspec '+refs/collab/:refs/remotes/origin/collab/' but it only lists (and therefore filters) remotes for '+refs/heads/:refs/remotes/origin/heads/'
Our org needs the custom refs location because that is how we automate code reviews. Â On version 3.4.1 of the plugin, this refspec worked just fine. Â On version 3.5.0, it broke and deleted all the collab branches.
Please let me know if you need any additional details. Â I would submit a PR but, my Java is weak. Â Thank you, kindly!
Â
Â
Â
- is duplicated by
-
JENKINS-45987 Cannot build merge requests from Gitlab on a multibranch pipeline job after Git plugin update to version 3.5.0
-
- Closed
-
- is related to
-
JENKINS-51134 GitSCMTelescope should support DiscoverOtherRefsTrait
-
- Open
-