-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Minor
-
Component/s: p4-plugin
-
None
The following Jenkinsfile snipplet ....
Â
checkout([$class: 'PerforceScm', Â credential: 'mycredentials', Â poll: true, Â changelog: true, Â populate: [$class: 'AutoCleanImpl', Â Â Â delete: true, Â Â Â modtime: false, Â Â Â Â parallel: [enable: false, minbytes: '1024', minfiles: '1', threads: '4'], Â Â Â pin: '', Â Â Â quiet: true, Â Â Â replace: true], Â Â workspace: [$class: 'ManualWorkspaceImpl', Â Â Â charset: 'none', Â Â Â name: 'jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}', Â Â Â pinHost: false, Â Â Â Â spec: [allwrite: true, Â Â Â Â Â clobber: false, Â Â Â Â Â Â compress: false, Â Â Â Â Â Â line: 'LOCAL', Â Â Â Â Â locked: false, Â Â Â Â Â Â modtime: false, Â Â Â Â Â Â rmdir: false, Â Â Â Â Â Â streamName: '', Â Â Â Â Â view: '//depot/path/... //jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}/...' Â Â Â ]Â Â Â Â Â Â Â ]Â Â Â Â Â Â ])
.... will checkout code and remove any workspace files from the previous build.
However it will NOT remove any directories that were left from previous builds.
I have a maven/tycho build that reproducibly fails with this setup:
it has a local maven repository (in the workspace root). The files in this repository (.repository directory) will be removed when the p4-plugin syncs the files. For some reason (I actually blame the maven-tycho-plugin) it breaks when downloading and unpacking artifacts (P2-artifacts in my case) when the repository-directories already exist, but not the artifacts inside.
Certainly this is not a p4-plugin bug, but I'd really like to see the option to sync the workspace and have exactly the same result for both syncing for the first time and subsequent syncs.
Â