A poll will always set the workspace root to null when using template workspaces.
Reproduction steps:
(1) Create a freestyle job using a template workspace using the workspace naming convention 'jenkins-${JOB_NAME}'.
(2) Set it to not run concurrent executions and pin to a specific node. This is important because the workspace name is invalid if it need to run concurrently or on more than one node.
(3) Set it's build trigger to be polling.
(4) Build the job. A client is created with a valid root.
(5) Run 'Poll Now'. The workspace root is set to 'null'. For example:
Client: jenkins-nullRoot Update: 2019/09/10 14:00:40 Access: 2019/09/10 14:00:00 Owner: admin Root: null Options: noallwrite noclobber nocompress unlocked nomodtime normdir SubmitOptions: submitunchanged LineEnd: local View: //depot/00342303-nullRoot/... //jenkins-nullRoot/...
Suggested Workaround:
Include '${NODE_NAME}' in the workspace name and run on a slave that is not the master where polling occurs.
- is related to
-
JENKINS-46908 Plugin seems to reset workspace root when polling
- Closed
-
JENKINS-52590 p4-plugin sets client root to null
- Closed