Skip to content
Browse files

[JENKINS-8446] pick more consistent default value if someone is insta…

…lling Jenkins fresh
  • Loading branch information
kohsuke committed Jul 6, 2011
1 parent 68d4d22 commit 4f0ea9da03301e6c671523cee1b4cf9e40a64c38
Showing with 6 additions and 1 deletion.
  1. +1 −1 core/src/main/java/hudson/model/
  2. +5 −0 core/src/main/java/jenkins/model/
@@ -236,7 +236,7 @@ public Computer createComputer() {
public FilePath getWorkspaceFor(TopLevelItem item) {
FilePath r = getWorkspaceRoot();
if(r==null) return null; // offline
return r.child(item.getName());
return r.child(item.getFullName());

public FilePath getRootPath() {
@@ -628,6 +628,11 @@ protected Jenkins(File root, ServletContext context, PluginManager pluginManager
throw new IllegalStateException("second instance");
theInstance = this;

if (!new File(root,"jobs").exists()) {
// if this is a fresh install, use more modern default layout that's consistent with slaves
workspaceDir = "${JENKINS_HOME}/workspace/${ITEM_FULLNAME}";

This comment has been minimized.

Copy link

jglick Mar 9, 2013


Unless I am missing something, this has no effect unless you happen to save global configuration in the initial session, because in the next session the jobs directory will exist (assuming you create one) and the default value of workspaceDir will be in effect. Did you mean to save() after this?


// doing this early allows InitStrategy to set environment upfront
final InitStrategy is = InitStrategy.get(Thread.currentThread().getContextClassLoader());

0 comments on commit 4f0ea9d

Please sign in to comment.
You can’t perform that action at this time.