P4 Windows use Root:null to support mapping sync to different drives.
this value is always overwritten when using p4 plugin, thus failing the sync.
p4 sync should use .../@ instead, and the workspace Root should not change.
P4 Windows use Root:null to support mapping sync to different drives.
this value is always overwritten when using p4 plugin, thus failing the sync.
p4 sync should use .../@ instead, and the workspace Root should not change.
Hi shai_shap - Thanks for the feedback.
Can you give me an example of why your build systems are using different drives for the Perforce data so that I can pass that to the developers. Please also give me screen shots of your job definition and/or Jenkinsfile.
Jenkins usually controls where we should sync the files which is why p4-plugin is designed to overwrite the root with the location provided by Jenkins. However this does not work well with the model of different files on different Windows drive or fixed locations on the disk.
To work around the problem you could use multiple 'p4sync' or 'checkout' steps to each drive in a Jenkinsfile but would need to change 'ws' path before each sync. Another way is to use P4Groovy or a batch file and 'p4.exe' but you would lose the power of polling and change reporting.
Reproduction Steps:
(1) Setup a build slave on Windows.
(2) Create a workspace with a null root. For example:
This would sync the files from '//depot/project1/...' to 'C:\filestore\ws\JENKINS'.
(3) If you use the workspace behavior 'Static' we will try to sync the path 'null/...'. If you use Template the '\C:\' would be inserted into the path. Each way will cause a bad build.
See related job JENKINS-47005.