-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Critical
-
Component/s: gerrit-code-review-plugin
-
None
If a Gerrit repository has a branch that contains origin in it's name, the integration with the Gerrit-Code-Review plugin breaks the Multibranch pipeline scan and the latter constantly fails.
Given one has a branch named dev/removeOrigins the scan instead checks for a branch with name dev/removerefs/headss. Of course this branch doesn't exist and the scan fails with a corresponding error.
This can reproduced easily by pushing a branch, containing origin anywhere in it's name, to a Gerrit repository that is integrated via the Gerrit-Code-Review plugin with Jenkins.
After a short code search I assume the problematic code piece is:
https://github.com/jenkinsci/gerrit-code-review-plugin/blob/6b6a798524bdfe52e38dd09d6f79d5c40f353297/src/main/java/jenkins/plugins/gerrit/AbstractGerritSCMSource.java#L581
There for the gitRef's key origin is generally replaced by refs/heads.
I don't know the exact/expected value of the gitRef key, but I assume the replacement has to be more specific.