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

Support for "Poll on Master" for git SCM plugin

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Critical Critical
    • git-plugin
    • None

      When slaves aren't always available sometimes the workspace goes missing - in this case, all affected task (i.e. those on the master) get rescheduled for building when their SCM is checked for a later revision.

      Polling on Master (see Perforce plugin) would address this issue, and remove excessive rebuilds. As we've got a massive amount of idle jobs active this hits us hard every time a slave goes offline (for any reason), or when Jenkins is restarted (for any reason), and doesn't know its slaves yet.

      I'm willing to write the actual patch, but would need some advice on how to add that to the code in a manner consistent with the current ideas behind it (it didn't jump at me when looking at it).

          [JENKINS-15136] Support for "Poll on Master" for git SCM plugin

          Craig Ringer added a comment -

          This is supposedly fixed by the fast-remote-polling option, available under advanced options in job configuration.

          I'm still seeing the odd unexpected build with "changes found" reported even when nothing seems to have changed, but overall it works well.

          Craig Ringer added a comment - This is supposedly fixed by the fast-remote-polling option, available under advanced options in job configuration. I'm still seeing the odd unexpected build with "changes found" reported even when nothing seems to have changed, but overall it works well.

          Mark Waite added a comment -

          Fast remote polling resolves this request. The "git ls-remote" command is used to implement the polling without requiring a clone of the repository on the master.

          Mark Waite added a comment - Fast remote polling resolves this request. The "git ls-remote" command is used to implement the polling without requiring a clone of the repository on the master.

          Mark Waite added a comment -

          Fast remote polling resolves this request

          Mark Waite added a comment - Fast remote polling resolves this request

          jurgen weber added a comment -

          this is not strictly true, you still have an edge case where you may want this.

          https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin#GitPlugin-FastRemotePolling

          the last polling is turned off for traditional workspace polling depending on what it is polling, if it's just a static branch sure fine, but if you wildcard it then it starts building slaves al lthe time.

          I worked around it by doing http://kohsuke.org/2011/12/01/polling-must-die-triggering-jenkins-builds-from-a-git-hook/ but I feel the feature may still want to be used by some.

          jurgen weber added a comment - this is not strictly true, you still have an edge case where you may want this. https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin#GitPlugin-FastRemotePolling the last polling is turned off for traditional workspace polling depending on what it is polling, if it's just a static branch sure fine, but if you wildcard it then it starts building slaves al lthe time. I worked around it by doing http://kohsuke.org/2011/12/01/polling-must-die-triggering-jenkins-builds-from-a-git-hook/ but I feel the feature may still want to be used by some.

            ndeloof Nicolas De Loof
            berlincount Andreas Kotes
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: