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

Branch indexing occurring for every multibranch job execution

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • p4-plugin
    • 1.11.2
      Jenkins 2.235.1

      When a job runs in the console log for that job 'p4 changes -m1' is run for every branch that matches the multibranch project source. For example the following job is running for '//streams/main':

       

      p4 client -i 
      Client  jenkinsTemp-c31cbc7b-5563-4c2e-96e4-60fc95703f4b saved.(p4):stop:8
      (p4):cmd:
      ...   View:
            //depot/multibranch/dev1/Jenkinsfile //jenkinsTemp-c31cbc7b-5563-4c2e-96e4-60fc95703f4b/Jenkinsfile
      
      p4 client -i 
      Client jenkinsTemp-c31cbc7b-5563-4c2e-96e4-60fc95703f4b saved.(p4):stop:17
      (p4):cmd:
      ...   View:
            //depot/multibranch/dev2/Jenkinsfile //jenkinsTemp-c31cbc7b-5563-4c2e-96e4-60fc95703f4b/Jenkinsfile
      
      p4 client -i 
      Client jenkinsTemp-c31cbc7b-5563-4c2e-96e4-60fc95703f4b saved.(p4):stop:26
      (p4):cmd:
      ...   View:
            //depot/multibranch/main/Jenkinsfile //jenkinsTemp-c31cbc7b-5563-4c2e-96e4-60fc95703f4b/Jenkinsfile

      Note that clients are created for 'dev1', 'dev2' and 'main' even though we only need to probe for changes to 'main' in this job execution. (Full console log attached)

       

      I would expect this in the Multibranch Scan Log but not every job execution.

       

      Reproduction steps:

      (1) Create following folders in Perforce and submit a Jenkinsfile to each:

      //depot/multibranch/dev1/...

      //depot/multibranch/dev2/...

      //depot/multibranch/main/...

      (2) Create a multibranch project with Helix Branches as the source and 'include branches' set to:

      //depot/multibranch/...

      and Scan Multibranch triggers set to '5 minutes'.

      (3) Manually build each job.

      (4) Submit a new file to '//depot/multibranch/main/...'.

      (5) Manually build the job. See that all branches are scanned in the console log for the main build job.

      (6) Submit another new file to '//depot/multibranch/main/...'.

      (7) Wait 5 minutes. See that all branches are scanned in the console.log and the Multibranch scan log.

       

       

       

        1. console26Text
          10 kB
          Karl Wirth
        2. image-2022-03-14-14-08-35-101.png
          14 kB
          Karl Wirth
        3. image-2022-03-14-14-12-28-247.png
          20 kB
          Karl Wirth

            Unassigned Unassigned
            p4karl Karl Wirth
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: