Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 for Jenkins Documentation | 1.17.3

# Perforce: Cleanup

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.

## 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 > System Configuration > System then scroll down to the section called 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 agents, the Jenkins workspace cleanup thread can remove your workspaces on those build agents. This can cause problems for future build jobs that use the workspace on those build agents.

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:

-Dhudson.model.WorkspaceCleanupThread.disabled=true

Your search for returned results