We're attempting to run some large pipeline jobs. Each job goes and runs a series of parallel jobs on multiple platforms for multiple targets.
When adding the options to include in changelog/polling that are now available:
checkout([ changelog: true, poll: true, scm: [ $class: 'PerforceScm', credential: credential, ...
The job will try to poll for changes. It correctly polls the actual Jenkinsfile, but when it goes to poll for each separate checkout in the pipeline script, it loses track of the previous change it built at and continually triggers a new build.
The name of our generated clients is:
'jenkins-${NODE_NAME}${JOB_NAME}${BUILD_NUMBER}-' + platform
The p4 plugins normally adds a "Description:" field into the client tracking the last change. During my testing I can't get the plugin to set the Description into the correct client, and if I manually add the field to the client, it does not get read and processed.
Until this is corrected I can't use polling of each individual checkout.
[JENKINS-39652] Add support for polling multiple checkouts with pipeline scripts
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Status | Original: In Progress [ 3 ] | New: In Review [ 10005 ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: In Review [ 10005 ] | New: Resolved [ 5 ] |
Status | Original: Resolved [ 5 ] | New: Closed [ 6 ] |
Code changed in jenkins
User: Paul Allen
Path:
src/main/java/org/jenkinsci/plugins/p4/PerforceScm.java
src/main/java/org/jenkinsci/plugins/p4/build/P4EnvironmentContributor.java
src/main/java/org/jenkinsci/plugins/p4/credentials/P4BaseCredentials.java
src/main/java/org/jenkinsci/plugins/p4/tagging/TagAction.java
src/main/java/org/jenkinsci/plugins/p4/tasks/AbstractTask.java
src/test/java/org/jenkinsci/plugins/p4/client/JenkinsfileTest.java
http://jenkins-ci.org/commit/p4-plugin/ad88e9695891a28332f5e1282698aff18a18f9b7
Log:
Multi client support in Pipeline.
If two or more `p4sync` operations are called in one Pipeline script,
they MUST have different client names. During a build, multiple
entries are added to the build history; on subsequent builds they are
used in the three following situations:
Added two test cases to cover basic multi sync build/poll situations.
JENKINS-38401JENKINS-37462JENKINS-39652