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

Declarative pipeline with pollSCM triggers 2 builds

    Details

    • Similar Issues:

      Description

      I have a multibranch declarative pipeline with a pollSCM trigger to poll every 2 minutes. Whenever there is a change to the branch in BitBucket it triggers correctly but about 2 minutes later it triggers again. I'm not sure if this is a bug or some configuration error on my behalf.

       

      I've attached a screenshot of the duplicate builds and poll log for one of the duplicate builds. Below is the top of my declarative pipeline for reference to how I am setting it up.

      pipeline {
         agent none
         environment {
            APPVERSION = '0.1.0'
            NUGET_API_KEY = credentials('build-server-nuget-id-readonly')
         }
         triggers {
             // poll repo every 2 minute for changes
             pollSCM('*/2 * * * *')
         }
         options {
             // add timestamps to output
             timestamps()
             overrideIndexTriggers(false)
             buildDiscarder(logRotator(numToKeepStr: '10'))
             skipStagesAfterUnstable()
             durabilityHint('PERFORMANCE_OPTIMIZED')
         }
      ...
      }

       

        Attachments

          Activity

          jonathank Jonathan Kuleff created issue -
          jonathank Jonathan Kuleff made changes -
          Field Original Value New Value
          Labels bitbucket declarative pipeline, pollscm
          jonathank Jonathan Kuleff made changes -
          Description I have a multibranch declarative pipeline with a pollSCM trigger to poll every 2 minutes. Whenever there is a change to the branch in BitBucket it triggers correctly but about 2 minutes later it triggers again. I'm not sure if this is a bug or some configuration error on my behalf.

           

          I've attached a screenshot of the duplicate builds and poll log for one of the duplicate builds. Below is the top of me declarative pipeline for reference to how I am setting it up.
          {code:java}
          pipeline {
             agent none
             environment {
                APPVERSION = '0.1.0'
                NUGET_API_KEY = credentials('build-server-nuget-id-readonly')
             }
             triggers {
                 // poll repo every 2 minute for changes
                 pollSCM('*/2 * * * *')
             }
             options {
                 // add timestamps to output
                 timestamps()
                 overrideIndexTriggers(false)
                 buildDiscarder(logRotator(numToKeepStr: '10'))
                 skipStagesAfterUnstable()
                 durabilityHint('PERFORMANCE_OPTIMIZED')
             }
          ...
          }{code}
           
          I have a multibranch declarative pipeline with a pollSCM trigger to poll every 2 minutes. Whenever there is a change to the branch in BitBucket it triggers correctly but about 2 minutes later it triggers again. I'm not sure if this is a bug or some configuration error on my behalf.

           

          I've attached a screenshot of the duplicate builds and poll log for one of the duplicate builds. Below is the top of my declarative pipeline for reference to how I am setting it up.
          {code:java}
          pipeline {
             agent none
             environment {
                APPVERSION = '0.1.0'
                NUGET_API_KEY = credentials('build-server-nuget-id-readonly')
             }
             triggers {
                 // poll repo every 2 minute for changes
                 pollSCM('*/2 * * * *')
             }
             options {
                 // add timestamps to output
                 timestamps()
                 overrideIndexTriggers(false)
                 buildDiscarder(logRotator(numToKeepStr: '10'))
                 skipStagesAfterUnstable()
                 durabilityHint('PERFORMANCE_OPTIMIZED')
             }
          ...
          }{code}
           
          jonathank Jonathan Kuleff made changes -
          Priority Minor [ 4 ] Major [ 3 ]
          abayer Andrew Bayer made changes -
          Component/s git-plugin [ 15543 ]
          Component/s bitbucket-plugin [ 18755 ]
          Component/s pipeline [ 21692 ]
          Component/s pollscm-plugin [ 17336 ]
          Assignee Vincent Latombe [ vlatombe ]
          markewaite Mark Waite made changes -
          Status Open [ 1 ] Fixed but Unreleased [ 10203 ]
          Resolution Not A Defect [ 7 ]
          markewaite Mark Waite made changes -
          Status Fixed but Unreleased [ 10203 ] Resolved [ 5 ]
          ascheman Gerd Aschemann made changes -
          Resolution Not A Defect [ 7 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          markewaite Mark Waite made changes -
          Status Reopened [ 4 ] Open [ 1 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              jonathank Jonathan Kuleff
            • Votes:
              3 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated: