Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-23287

GIT_BRANCH not set when 'Merge before build' is used

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • git-plugin
    • None

      We have a shell script driven build, that uses the value of GIT_BRANCH to figure out what branch we are building. This works fine for a simple configuration with one branch configured.

      Recently, I added a 'Merge before build' step to the configuration, so a specific topic branch is merged into master before building. This results in GIT_BRANCH being unset. I was expecting it to be set to the branch, that is being merged into (e.g. master), since that is still the branch that should be tracked for changes.

      How can I pass branch information into a shell script when using 'Merge before build'?

            ndeloof Nicolas De Loof
            tba T.B. Anton
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: