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.
- is duplicated by
-
JENKINS-68374 Disable all branch scanning when triggering specific branch
- Closed