提交 a8c3a031 编写于 作者: N Nicolas De Loof

check disk space on workspace creation failure

上级 3f350e0a
......@@ -56,6 +56,7 @@ import hudson.model.labels.LabelExpression;
import hudson.model.listeners.SCMPollListener;
import hudson.model.queue.CauseOfBlockage;
import hudson.model.queue.SubTaskContributor;
import hudson.node_monitors.DiskSpaceMonitor;
import hudson.scm.ChangeLogSet;
import hudson.scm.ChangeLogSet.Entry;
import hudson.scm.NullSCM;
......@@ -1371,7 +1372,13 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
return true; // no SCM
FilePath workspace = build.getWorkspace();
try {
workspace.mkdirs();
} catch (IOException e) {
// Can't create workspace dir - Is slave disk full ?
new DiskSpaceMonitor().data(build.getBuiltOn().toComputer());
throw e;
}
boolean r = scm.checkout(build, launcher, workspace, listener, changelogFile);
if (r) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册