[ https://issues.jenkins-ci.org/browse/JENKINS-12655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=162964#comment-162964 ]
Ruth Morgenstein commented on JENKINS-12655: -------------------------------------------- Still broken in 1.18. > GIT_BRANCH is incorrect in build steps when branch choosing strategy is set > to inverse (but it is correct in build name macro) > ------------------------------------------------------------------------------------------------------------------------------ > > Key: JENKINS-12655 > URL: https://issues.jenkins-ci.org/browse/JENKINS-12655 > Project: Jenkins > Issue Type: Bug > Components: git > Reporter: Ruth Morgenstein > Assignee: abayer > > Context: I'm trying to create a parameterized job chain for our branches. > Version info: > Jenkins 1.450 > Git 1.1.15 > build-name-setter 1.3 > parametrized trigger 2.12 > 1) Set the git branch to */master and in advanced, select branching strategy > = inverse > 2) Set the build name (using plugin) to #${BUILD_NUMBER}.${GIT_BRANCH} > 3) In the build, use shell to execute: echo ${BUILD_BRANCH} > 4) Push a change into a branch in git then manually start the build in Jenkins > Result: > The build string is set correctly to the branch used in step#4, but the echo > in step #3 incorrectly says origin/master. Note, that the wrong GIT_BRANCH is > also sent in my parameterized trigger. > The setting for GIT_BRANCH is correct at all times when Default choosing > strategy is selected. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira