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

Jenkins builds incorrect branch when regex branch specifier changes

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • git-plugin
    • None
    • git-plugin 2.4.0
      Jenkins ver. 1.626

      Today I noticed what seems to be a bug in Jenkins/git-plugin due to some sort of caching(??)

      • create new freestyle project
      • use git scm
      • specify a regex branch specifier, eg. :origin/master
      • save and build
      • update project, changing the branch specifier, eg. :origin/yolo
      • save and build
      • update the project, changing the branch specifier back to the original, eg. :origin/master
      • save and build

      I'd expect the last build to be master, but it really just checks out the previous branch :origin/yolo.

      I came across this when I tried using a parameterized build setup to build multiple branches :origin/(master|v.*) on scm change, with the option to manually specify a branch to build via the parameter. However, after changing the branch specifier in this case, Jenkins/git-plugin seems to get stuck on one branch :o.

      Let me know if I can help with any other details.

          [JENKINS-31865] Jenkins builds incorrect branch when regex branch specifier changes

            Unassigned Unassigned
            wilrnh William Hutson
            Votes:
            5 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: