From f6e6328ecd633f0e1d2f5826867c8e66742632e2 Mon Sep 17 00:00:00 2001 From: Kiyoshi Lee Date: Wed, 17 Dec 2014 09:38:44 -0800 Subject: [PATCH] LPS-52234 Add ability to post compile failures --- build-github.xml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/build-github.xml b/build-github.xml index 7910b4caf0c2d0..606f8cc5900061 100644 --- a/build-github.xml +++ b/build-github.xml @@ -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"); @@ -299,7 +310,7 @@ sb.append(getRebaseErrorMessage(githubJenkinsFailureURL)); } else { - sb.append(jsonObject.get("result")); + sb.append(getConsoleErrorMessage(githubJenkinsFailureURL)); } sb.append("");