Does Jenkins 2.289.2 have a customizable workspace?
-
I don't know where this is set, but jobs from my Jenkins 2.289.2 server appear to be working out of the directory
/home/jenkins/workspace/${job_name}
. E.g. if I have a minimal pipeline script that justtouch
es a path-unspecified file, it ends up in that directory.Question: where is this setting viewable or editable in the Jenkins web UI?
Question: (assuming this is an editable setting) is this editable per-job, or is this only a global configuration?
Question: is this setting viewable in "Configuration as Code"? I don't see the directory anywhere in the yml generated by theView Configuration
button at${jenkins_url}:8080/configuration-as-code/
-
Your first question is a duplicate of this https://stackoverflow.com/questions/34854377/how-to-change-workspace-and-build-record-root-directory-on-jenkins .
Your second question. Each machine has a setting. So the Jenkins controller and the Jenkins Agent/s will each have its own setting.
You can change the workspace https://www.jenkins.io/doc/pipeline/steps/workflow-durable-task-step/#ws-allocate-workspace . But I have never seen anyone do it.
I can't answer your last question because I don't have a jenkins with that plugin to look at but it is something that can be configured. I see in the README an example for setting https://github.com/jenkinsci/configuration-as-code-plugin .
EDIT: Thanks to https://devops.stackexchange.com/users/13379/ian-w we now know that those setters were moves to system properties. With that information I was able to research more on JasC and found that you can set the
rawBuildsDir
if you use therestricted
flag. But you can set theworkspacedDir
unless you drop into a groovy init file. You can find all the information in this GitHub https://github.com/jenkinsci/configuration-as-code-plugin/issues/151 .