提交 a6204318 编写于 作者: J Jesse Glick

Merge branch 'master' of github.com:n-nachiappan/jenkins

...@@ -2602,11 +2602,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve ...@@ -2602,11 +2602,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
throw new IOException(projectsDir+" is not a directory"); throw new IOException(projectsDir+" is not a directory");
throw new IOException("Unable to create "+projectsDir+"\nPermission issue? Please create this directory manually."); throw new IOException("Unable to create "+projectsDir+"\nPermission issue? Please create this directory manually.");
} }
File[] subdirs = projectsDir.listFiles(new FileFilter() { File[] subdirs = projectsDir.listFiles();
public boolean accept(File child) {
return child.isDirectory() && Items.getConfigFile(child).exists();
}
});
final Set<String> loadedNames = Collections.synchronizedSet(new HashSet<String>()); final Set<String> loadedNames = Collections.synchronizedSet(new HashSet<String>());
...@@ -2652,6 +2648,10 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve ...@@ -2652,6 +2648,10 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
for (final File subdir : subdirs) { for (final File subdir : subdirs) {
g.requires(loadHudson).attains(JOB_LOADED).notFatal().add("Loading job "+subdir.getName(),new Executable() { g.requires(loadHudson).attains(JOB_LOADED).notFatal().add("Loading job "+subdir.getName(),new Executable() {
public void run(Reactor session) throws Exception { public void run(Reactor session) throws Exception {
if(!Items.getConfigFile(subdir).exists()) {
//Does not have job config file, so it is not a jenkins job hence skip it
return;
}
TopLevelItem item = (TopLevelItem) Items.load(Jenkins.this, subdir); TopLevelItem item = (TopLevelItem) Items.load(Jenkins.this, subdir);
items.put(item.getName(), item); items.put(item.getName(), item);
loadedNames.add(item.getName()); loadedNames.add(item.getName());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册