-
Bug
-
Resolution: Not A Defect
-
Minor
I might have misconfigured my job, given this piece of documentation https://github.com/jenkinsci/p4-plugin/blob/master/docs/MULTI.md
>Lightweight checkout is automatically applied by Jenkins to MultiBranch jobs
However I'm running a multibranch job that is polling //depot/... to find streams. The actual sync for this project should be a very small subset of the matched stream, while the whole stream is many gigabytes worth of data.
I have the following code in the Jenkinsfile
pipeline { agent any stages { stage('Sync') { steps { checkout perforce( credential: 'credentialname', populate: autoClean(), workspace: manualSpec( charset: 'utf8', name: "jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}", spec: clientSpec( allwrite: true, view: """\ //depot/${env.BRANCH_NAME}/ServerCode/... //\${P4_CLIENT}/ServerCode/... //depot/${env.BRANCH_NAME}/ApplicationCode/SubDir/... //\${P4_CLIENT}/ApplicationCode/SubDir/... """, streamName: "//depot/${env.BRANCH_NAME}" ) ) ) } } } }
but my console log shows a full sync of //depot/StreamName/... before this stage runs. Adding "options { skipDefaultCheckout() }" doesn't have any effect.
Hi asmith_pipeworks -Thanks for your interest in the plugin.
A couple of questions....
Can you please send me a screenshot of the 'Branch Sources' section of your multibranch job configuration page. For a streams depot I would expect something like:
Also just to double check. Have you changed the name of your depot in the above Jenkinsfile? Perforce by default comes with a 'classic' depot called 'depot' that you cannot create streams under. Streams can only be created under a depot of type 'stream'. You can check this by running 'p4 depots'.
The reason I'm pointing this out is that we use different code for streams and classic depots. If the code for a streams was used against a classic depot we would sync everything.
Finally can you send me the version of p4-plugin and Jenkins you are using.
Thanks in advance,
Karl