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

p4sync in parallel causes invalid SCM triggering

XMLWordPrintable

      I have a very basic pipeline job with SCM polling that runs p4sync in parallel on separate nodes with separate workspaces. Unfortunately this job triggers over and over again and I believe this is caused by a bug in the P4 Plugin.

      Pipeline script:

      def generateBranches() {
        def branches = [:]
        branches["Branch-0"] = {
          node('some_node') {
            p4sync credential: 'perforce-tst', format: "jenkins-${NODE_NAME}-${JOB_NAME}-Branch-0", depotPath: "//product1/main", populate: [$class: 'ForceCleanImpl', quiet: true]
          }
        }
        branches["Branch-1"] = {
          node('some_node') {
            p4sync credential: 'perforce-tst', format: "jenkins-${NODE_NAME}-${JOB_NAME}-Branch-1", depotPath: "//product1/main", populate: [$class: 'ForceCleanImpl', quiet: true]
          }
        }
        return branches
      }
      
      stage("Checkout") {
        parallel generateBranches()
      }
      

      Polling log from invalid trigger:

      Started on Apr 21, 2017 6:24:05 PM
      P4: Polling on: master with:jenkins-vs-docker-deb8-amd64-1-test_jobs-trigger-test-job-3-Branch-0
      Found last change 2053609 on syncID jenkins-vs-docker-deb8-amd64-1-test_jobs-trigger-test-job-3-Branch-0
      (p4):cmd:... p4 client -o jenkins-vs-docker-deb8-amd64-1-test_jobs-trigger-test-job-3-Branch-0
      p4 client -o jenkins-vs-docker-deb8-amd64-1-test_jobs-trigger-test-job-3-Branch-0
      
      Perforce password (P4PASSWD) invalid or unset.
      
      (p4):stop:4
      (p4):cmd:... p4 info
      p4 info
      
      (p4):stop:5
      
      P4 Task: establishing connection.
      ... server: perforce-tst.miclaser.net:1777
      ... node: jenkins-mw
      P4: Polling with range: 2053609,now
      (p4):cmd:... p4 changes //jenkins-vs-docker-deb8-amd64-1-test_jobs-trigger-test-job-3-Branch-0/.___
      p4 changes //jenkins-vs-docker-deb8-amd64-1-test_jobs-trigger-test-job-3-Branch-0/...@2053609,now
      
      Change 2053609 on 2017/04/20 by 9675frerev@9675frerev_se-dt-3170_TEST 'Jenkins trigger test #4
      '
      (p4):stop:6
      P4: Polling on: master with:jenkins-vs-docker-deb8-amd64-1-test_jobs-trigger-test-job-3-Branch-1
      Done. Took 60 ms
      Changes found
      

            tangkun75 Kun Tang
            chetic Fredrik Reveny
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: