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

Duplicate commits displayed on Pipeline build when using "Poll SCM" and "Pipeline script from SCM"

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • Jenkins 2.107.3, Pipeline 2.5, Pipeline: SCM Step 2.6, Team Foundation Server 5.133.0

      • Pipeline script has checkout step in it, checking out from TFS: 
        • checkout([changelog: false, $class: 'TeamFoundationServerScm', credentialsConfigurer: [$class: 'AutomaticCredentialsConfigurer'], projectPath: '$/pathToProject/', serverUrl: 'https://serverUrl/', useOverwrite: true, useUpdate: false, userName: 'usrName', workspaceName: 'Hudson-${JOB_NAME}-${NODE_NAME}'])

       

      • Pipeline job has Poll SCM enabled
      • Pipeline job set up to use Pipeline script from SCM

       

      Upon Poll SCM seeing a changeset, builds are correctly triggered. However, commits are shown three times each (see attached image), which messes up the logs. I cannot find a way around this; changelog is set to false in the checkout. 

       

          [JENKINS-51641] Duplicate commits displayed on Pipeline build when using "Poll SCM" and "Pipeline script from SCM"

          Jack Bradach added a comment -

          We see the same issue in our environment, using the Perforce plugin in poll mode.

          Jack Bradach added a comment - We see the same issue in our environment, using the Perforce plugin in poll mode.

          William Brode added a comment -

          When I've seen this before it's because we are doing the same checkout multiple times.  Are you sure your checkout wasn't inside of a loop or something?  Or are your source and jenkinsfile and pipeline shared library all on the same perforce server?

          William Brode added a comment - When I've seen this before it's because we are doing the same checkout multiple times.  Are you sure your checkout wasn't inside of a loop or something?  Or are your source and jenkinsfile and pipeline shared library all on the same perforce server?

          Jack Bradach added a comment -

          Funny you should ask; turns out the affected jobs all run a script that does one or more perforce checkouts as part of the build process as some sort of Uzumaki in Makefile form.  >.<   They're going to make it stop doing that, and I imagine we'll be fine until it awakens again.

          Jack Bradach added a comment - Funny you should ask; turns out the affected jobs all run a script that does one or more perforce checkouts as part of the build process as some sort of Uzumaki in Makefile form.  >.<   They're going to make it stop doing that, and I imagine we'll be fine until it awakens again.

            redsolo redsolo
            whatsdevops Angelo Loria
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: