Reputation: 276
I need to set my workspace root directory to another location to save space on the C drive. I am able to change the configuration in the 'workspace root directory' field in Manage Jenkins / Configuration but this is not reflected in my builds.
I've tried restarting the windows service, rebooting etc. I've also tried as previous posts suggested building from the 'workspace' page for affected projects to no avail.
I've tried setting the workspace root directory to: D:/Jenkins/workspace/ D:\Jenkins\workspace D:/Jenkins/workspace/${ITEM_FULLNAME}
However, builds are still trying to use the default workspace as seen by the console output: "Started by user anonymous Building on master in workspace C:\Program Files (x86)\Jenkins\workspace\xxxx\xxxxx"
I have tried clearing workspaces of failing jobs and building from the 'workspace' page for those jobs - this didn't help.
Upvotes: 2
Views: 7869
Reputation: 276
I found the issue. There was a custom workspace set for each job in the dev server that I inherited. The custom workspace was a relative path (\jobname...) but it was appending the relative path to the 'Home Directory' as opposed to the 'Workspace Root Directory'. I had assumed wrongly that the custom workspace path would be relative to the workspace root directory.
Upvotes: 2
Reputation: 371
sc delete <service name>
from cmdUpvotes: 0
Reputation: 664
you can change it in jenkins config .xml and restart the service.
if you want same workspace for all the jobs then you can use customized workspace which is available in advanced tab.
Upvotes: 0