-
Improvement
-
Resolution: Unresolved
-
Minor
-
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.