Streams workspace
Uses a specified template to generate the workspace view. The name of the workspace is generated using the Workspace Name Format field. This makes it an ideal choice for Matrix builds.
- Workspace behaviour: select Streams (view generated by Perforce for each node) from the dropdown list.
- Character Set: sets the character set used by Jenkins when syncing files from the Perforce Helix Core Server. This should be set to none unless the workspace is connected to a Unicode enabled Helix Core Server.
- Stream Codeline: specify the full Perforce depot path for the stream that will be used to create or update the Jenkins build workspace. If you are connected to a Helix Core Server, streams will be auto suggested as you type.
- Stream at change: when specified the client view is generated from the stream specification version at or before the change number.
- Pin the workspace to the build host: this can usually be left unselected because the ${NODE_NAME} variable in the Workspace Name Format field does this for you.
- Workspace Name Format: Jenkins slave nodes must each use a unique Perforce workspace. The format string configures the workspace name by substituting the specified variables. At least one variable must be used, but it is recommended that, as a minimum, the following variables are used:
- 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:
jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}
For more information about variables, see Variable Expansion.
Pipeline:
name: 'jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}',
Using full double quotes " expands the variables early and the script will fail.