提交 c6ffab11 编写于 作者: K Kohsuke Kawaguchi

[HUDSON-5073] if the build fails because the node went offline, point the user...

[HUDSON-5073] if the build fails because the node went offline, point the user to the slave log where the details are.
上级 0ddb0c5c
......@@ -29,6 +29,7 @@ import hudson.Functions;
import hudson.Launcher;
import hudson.Util;
import hudson.FilePath;
import hudson.console.HyperlinkNote;
import hudson.slaves.WorkspaceList;
import hudson.slaves.NodeProperty;
import hudson.slaves.WorkspaceList.Lease;
......@@ -416,6 +417,14 @@ public abstract class AbstractBuild<P extends AbstractProject<P,R>,R extends Abs
Result result = doRun(listener);
Computer c = node.toComputer();
if (c==null || c.isOffline()) {
// See HUDSON-5073. looks like we went offline during the build
// point the user to the slave log
listener.hyperlink("/computer/"+builtOn+"/log","Looks like the node went offline during the build. Check the slave log for the details.");
listener.getLogger().println();
}
// kill run-away processes that are left
// use multiple environment variables so that people can escape this massacre by overriding an environment
// variable for some processes
......
......@@ -76,6 +76,9 @@ public interface TaskListener extends Serializable {
/**
* Places a {@link HyperlinkNote} on the given text.
*
* @param url
* If this starts with '/', it's interpreted as a path within the context path.
*/
void hyperlink(String url, String text) throws IOException;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册