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

Workflows are executed multiple times if they take longer than their poll period

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • pipeline
    • Jenkins version: 1.609.1
      Workflow Plugin version: 1.10
      Mercurial Plugin version: 1.54

      When executing a workflow build that is triggered by SCM polling, if a triggered run takes longer than the polling period to complete, then additional runs will be scheduled every time the polling period expires until the initially triggered build completes.

      I've only seen this issue with the mercurial plugin so far, but I don't really have any builds that use any other SCM plugins, so that doesn't necessarily mean anything.

      A minimal workflow that should recreate the problem is below (fill in your own SCM details):

        //Do an SCM checkout here.
      
        sh 'sleep 120' // Set the polling interval to 1 minute
      

            jglick Jesse Glick
            greg_symons Gregory Symons
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: