'Change Jenkins Workspace Format To Windows
I am running a job from Linux-based Jenkins onto a Windows Agent where I am looking to build a docker image.
When the job starts to run, the workspace begins with E:/jenkins_agent/Workspace format which is not supported in windows.
I am looking for a way to replace '/' in the WORKSPACE with '' in the jenkinsfile right before I execute my command on the windows machine, I am not interested in changing that on the Jenkins server as there are Linux agents running as well.
I tried every trick I found online but none of them actually worked.
Any help will be greatly appriciated.
Solution 1:[1]
I found the solution. I changed the agent root directory in the agent management page to 'e:\jenkins_agent' instead of 'e:/jenkins_agent' and that did the trick for the entire workspace format.
I hope this will help someone in the future :)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Eran Mor |
