Used to cleanup the client workspace after the build. Optionally, setting the global option will delete the workspace files.
To delete the workspace files after the build, use the global setting in Perforce: OnDelete Workspace Options, see Perforce: OnDelete Workspace Options.
Delete Client checkbox:
- Selected: Perforce cleans up the client workspace including the have list. Optionally, setting the global option will delete the workspace files, see Perforce: OnDelete Workspace Options.
- Unselected: the client workspace is not deleted. Optionally, setting the global option will delete the workspace files, see Perforce: OnDelete Workspace Options.
Specify how cleanup is handled for a Jenkins job that includes a Perforce: Cleanup post-build action.
From the Jenkins home page browse to Manage Jenkins > Configure System > Perforce: OnDelete Workspace Options:
You can select a number of options:
- Delete Perforce client: only applicable when deleting a Jenkins job.
- Delete Workspace files: if your Jenkins job contains a cleanup step or you are deleting a Jenkins job: Perforce deletes the workspace files including the have list.
Jenkins workspace cleanup thread
On rarely used build slaves, the Jenkins workspace cleanup thread can remove your workspaces on those build slaves. This can cause problems for future build jobs that use the workspace on those build slaves.
To avoid this happening, we recommend that you:
manage your workspaces though P4 Plugin Perforce: cleanup
disable the Jenkins automated workspace cleanup thread by adding the following line to the Jenkins startup arguments: