p4 plugin: 1.10.12

       

      It is a multibranch pipeline project with Helix Streams as its source. See the attached screen shot (multi_pipeline.png).

       

      I have the following trigger, so the trigger will be fired only when there is a submit to //stream/Dev-A/…

       

      $ p4 triggers -o | grep -v “^#”

      Triggers:

           jenkins change-commit //stream/Dev-A/... “%//depot/jdepot.sh% %change%”

       

      jdepot.sh is attached.

       

      However, in the following steps, a Jenkins job for another stream path, //stream/Dev-B/… is also fired. 

      • A submit is made to //stream/Dev-B/…
      • No Jenkins job is fired since the submit was not for //stream/Dev-A/…, which is expected.
      • A submit is made to //stream/Dev-A/…
      • A Jenkins job for //stream/Dev-A/… is fired, which is expected.
      • However, a Jenkins job for //stream/Dev-B/… which was previously submitted is also fired.

       

      Jenkinsfile for //stream/Dev-A/… and //stream/Dev-B/… are attached. See Jenkins_Dev-A and Jenkins_Dev-B.

        1. jdepot.sh
          0.3 kB
        2. Jenkinsfile_Dev-A
          0.6 kB
        3. Jenkinsfile_Dev-B
          0.6 kB
        4. multi_pipeline.png
          multi_pipeline.png
          97 kB

          [JENKINS-61825] P4 - Additional build occurs

          Karl Wirth added a comment -

          Hi s3037560

          The Perforce trigger you are using tells all jobs to wake up and check if they need to be built. Therefore any job that has:

          triggers { p4Trigger() } 
          

          will wake up and check if it needs to be built. In your case there are new changes so it will run the build.

          If you are after a more targeted build you need to remove the 'triggers' line above from your pipeline script and call the direct URL for the job in your Perforce trigger. For example:

          http://MyJenkinsServer:8080/job/MyJobName/job/MyBranchName/build?delay=0sec
          

           

           

          Karl Wirth added a comment - Hi s3037560 The Perforce trigger you are using tells all jobs to wake up and check if they need to be built. Therefore any job that has: triggers { p4Trigger() } will wake up and check if it needs to be built. In your case there are new changes so it will run the build. If you are after a more targeted build you need to remove the 'triggers' line above from your pipeline script and call the direct URL for the job in your Perforce trigger. For example: http: //MyJenkinsServer:8080/job/MyJobName/job/MyBranchName/build?delay=0sec    

            p4karl Karl Wirth
            s3037560 Kevin Park
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: