-
Improvement
-
Resolution: Fixed
-
Trivial
-
None
-
Jenkins LTS ver. 2.32.1
Nodes and Processes Plugin 2.8
I consider this a bug, but feel free to reclassify.
node { ws ('workspace/customDir') { println "workspace: ${env.WORKSPACE}" } }
[Pipeline] node Running on <node> in E:\JenkinsRoot\workspace\Experiments\Test_Workspace [Pipeline] { [Pipeline] ws Running in E:\JenkinsRoot\workspace\customDir [Pipeline] { [Pipeline] echo workspace: E:\JenkinsRoot\workspace\Experiments\Test_Workspace [Pipeline] } [Pipeline] // ws [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline Finished: SUCCESS
I can't find a way, in code, to get the path to the workspace after using the ws step. At the moment the only way I've found is to run a batch or shell script and get the current working directory from there.
Please tell me if I'm missing something