The workspace path on each Disk within this Disk Pool will be computed based on a workspace template.
If not provided, the workspace path is computed based on a default pattern: ${physicalPathOnDisk}/${JOB_NAME}/${BUILD_NUMBER}. The physicalPathOnDisk is defined separately for each Disk entry.
An example of a custom workspace template: ${JOB_NAME}/${CUSTOM_BUILD_PARAM}/${BUILD_NUMBER}. When the exwsAllocate step is called in the Pipeline script, it will resolve the variables from this template.
And the associated Pipeline script:
def extWorkspace withEnv (['CUSTOM_BUILD_PARAM=100']) { extWorkspace = exwsAllocate diskPoolId: 'diskpool1' } ...
Note: It's recommended to use ${ } for variable declaration, instead of standalone $ symbol, as shown in the examples.