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

"poll: false" has no effect in scm (and git) pipeline steps

XMLWordPrintable

      When I create a pipeline job with the following Jenkinsfile (not from SCM):

       

      properties([pipelineTriggers([pollSCM('H/2 * * * *')])])
      
      node() {
      git(url: 'https://github.com/amezin/jenkins-cant-stop-polling.git', poll: false)
      }
      

      I expect that it won't be triggered when I push something to https://github.com/amezin/jenkins-cant-stop-polling

      However, it becomes triggered by SCM change. Polling log ends with "Changes found".

      Real use case is more complex and involves a custom SCM plugin, but this simple pipeline with git step behaves the same way.

      As a workaround, I'll add 'poll' option to our custom SCM plugin (and make its compareRemoteRevisionWith() return NO_CHANGES when set to false). I do not know any workaround for Git and Mercurial plugins (I'd prefer not to build a custom patched version of these).

       

            Unassigned Unassigned
            amezin Aleksandr Mezin
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: