Dominik Bartholdi the multi-branch Pipeline already works as you describe, at least according to JENKINS-50622. If Pipeline (without multi-branch) needs to work that way, it is a change to another plugin, not the git plugin. I assigned this to the model definition plugin in hopes that is the correct location. I'm unwilling to add the "BRANCH" environment variable to the git plugin because that risks confusion for other plugins (like Pipeline) which operate with that environment variable. I don't want to manage precedence rules (when does the git plugin assignment of BRANCH override the Pipeline assignment of branch). The git plugin records the branch name in GIT_BRANCH. Other plugins may use different environment variable names for branches. |