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

P4 for Jenkins Documentation | 1.17.3

# Spec File workspace

Loads the workspace configuration from a depot file containing a client workspace spec. This is the same output as p4 client -o and the Spec depot .p4s format. The name of the Workspace must match the name of the client workspace spec.

1. In Workspace behaviour, ensure that Spec File (load workspace spec from file in Perforce)is selected.
2. Use Character Set to set the character set used by Jenkins when syncing files from the Perforce P4 Server. This should be set to none unless the workspace is connected to a Unicode enabled P4 Server.

3. In Workspace name, enter a unique name for the manual workspace. Each Jenkins agent node must use a distinct Perforce workspace. The name is generated using a format string that substitutes predefined variables. You must include at least one variable, but it's recommended to use the following as a minimum:

   jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}

   For more information about variables, see Variable Expansion

   Pipeline:

   - Use a unique workspace name for the Jenkinsfile that will not get reused by the sync steps in the script. A postfix of -script will help to identify the workspace's use and make it unique from code sync steps.

   - Variables in the script for the workspace name must be surrounded by single quotes as shown:

   name: 'jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}',

   Using full double quotes " expands the variables early and the script will fail.

4. In Depot path for workspace spec, specify the depot path that the existing Perforce workspace spec is stored in. If you are connected to a P4 Server, suitable paths will be auto suggested as you type.

Your search for returned results