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

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

      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).

       

          [JENKINS-60757] "poll: false" has no effect in scm (and git) pipeline steps

          Khoa added a comment - - edited

          Any roadmap for this bug? We also run into this issue.

          We do NOT have enough compute resource to go with Multibranch Pipeline.

          Khoa added a comment - - edited Any roadmap for this bug? We also run into this issue. We do NOT have enough compute resource to go with Multibranch Pipeline.

          Westy added a comment - - edited

          I'm amazed that this has been broken for so long, and is listed as minor?!

          This is a massive problem!

           

          When have a multi-branch pipeline, and you're using its polling to trigger builds on the main repo, this bug causes needless additional builds if need to poll another repo within your pipeline!

          I cannot find a workaround as yet...

           

          Edit: Ahh, can change priority by the looks of it

          Westy added a comment - - edited I'm amazed that this has been broken for so long, and is listed as minor?! This is a massive problem!   When have a multi-branch pipeline, and you're using its polling to trigger builds on the main repo, this bug causes needless additional builds if need to poll another repo within your pipeline! I cannot find a workaround as yet...   Edit: Ahh, can change priority by the looks of it

          Cenk Tosun added a comment -

          As long as this bug is present, you can use a workaround by adding an additional configuration.

          This will ensure that the configured repository is excluded from the git polling log, which prevents unnecessary triggered builds.

           

          poll: false
          changelog: false

           

          Cenk Tosun added a comment - As long as this bug is present, you can use a workaround by adding an additional configuration. This will ensure that the configured repository is excluded from the git polling log, which prevents unnecessary triggered builds.   poll: false changelog: false  

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

              Created:
              Updated: