Skip to content

Commit

Permalink
LPS-52234 Add ability to post compile failures
Browse files Browse the repository at this point in the history
  • Loading branch information
kiyoshilee authored and brianchandotcom committed Dec 20, 2014
1 parent 599cc7a commit f6e6328
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion build-github.xml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,17 @@
return url;
}
public String getConsoleErrorMessage(String githubJenkinsFailureURL) {
String consoleOutput = toString(githubJenkinsFailureURL + "/logText/progressiveText");
int x = consoleOutput.indexOf("BUILD FAILED");
int y = consoleOutput.indexOf("Total time:");
String errorMessage = consoleOutput.substring(x, y - 2);
return fixJSON(errorMessage);
}
public String getRebaseErrorMessage(String githubJenkinsFailureURL) {
String consoleOutput = toString(githubJenkinsFailureURL + "/logText/progressiveText");
Expand Down Expand Up @@ -299,7 +310,7 @@
sb.append(getRebaseErrorMessage(githubJenkinsFailureURL));
}
else {
sb.append(jsonObject.get("result"));
sb.append(getConsoleErrorMessage(githubJenkinsFailureURL));
}
sb.append("</pre>");
Expand Down

0 comments on commit f6e6328

Please sign in to comment.