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

Fix unlimited build loop using GIT Plugin behavior

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Major Major
    • git-plugin
    • None

      Since 2014 the git plugin has an unfortunate behavior where in some environments it automatically spawns two builds whenever one build starts, leading to an endless loop. This is especially annoying, if the build or its consequences cost actual money. The only fix appears to be to prefix the branch with refs/heads/, which appears to pacify the plugin.

      In 2018 Mark Waite rejected to break the loop e.g. in JENKINS-21464 and JENKINS-54102, as it might break other unspecified use cases.

      As this behavior is very annoying when it happens and Jenkins just blows up a build server, I'd propose a different approach. 

      Make this a manually configured GIT Behavior to never kick off multiple builds when multiple candidate revisions are encountered. The default can still be to kick off multiple builds, to not break some use cases, but then the other users can get working behavior, as well.

            Unassigned Unassigned
            ncubede Stephan Trebels
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: