When there are 2 or more global libraries P4Jenkins will use the same SyncID for both. This causes polling to always find a change even when no change has occurred.
P4: Polling on: master with:jenkins-library
Found last change 3 on syncID jenkins-library
Found last change 2 on syncID jenkins-library
...cut...
P4: Polling with range: 2,3
... p4 changes -m20 //jenkins-library/...@2,3 +
...cut...
Changes found
Reproduction Steps:
(1) Under Manage Jenkins add two Helix based Libraries called 'my-shared-library' (org.foo.lib) and 'my-shared-library2' (org.bar.lib).
(2) Create a Jenkinsfile that includes both libraries and uses one of them. For example:
@Library('my-shared-library') @Library('my-shared-library2') import org.foo.lib.* import org.bar.lib.* pipeline { agent { label 'master' } stages { stage("Repro") { steps { script { def z = new org.foo.lib() z.testFunc1() z.testFunc2() } } } } }
(3) Create a pipeline job that uses the above Jenkinsfile and uses polling as the build trigger.
(4) Manually run the build.
(5) Wait for each poll interval.
Result: A build is triggered for every poll.
Expected Result: Only a change submitted to the libraries after step (4) should cause a poll to trigger a build.
- is related to
-
JENKINS-49047 SyncID and workspace same for all Global libraries
- Closed