Based on the input parameter, it defines the local path to the workspace, and switches to it.
The complete workspace path follows the pattern:
/localRootPath/physicalPathOnDisk/$JOB_NAME/$BUILD_NUMBER
where
-
localRootPath is defined either in the Node configuration, External Workspace section, or in the
Jenkins global config, the External Workspace Template section. Firstly it searches for the disk
definition in the Jenkins global config (the Template lookup is done based on the Node
label parameter), then it fallbacks to searching in the Node configuration.
-
physicalPathOnDisk is defined in the Jenkins global config, the External Workspace Definitions
section.