diff --git a/vars/githubPr.groovy b/vars/githubPr.groovy index 4c19511bb8953..91a4a76894d94 100644 --- a/vars/githubPr.groovy +++ b/vars/githubPr.groovy @@ -106,23 +106,28 @@ def getTestFailuresMessage() { } def messages = [] + messages << "---\n\n### [Test Failures](${env.BUILD_URL}testReport)" - failures.take(5).each { failure -> + failures.take(3).each { failure -> messages << """ ---- - -### [Test Failures](${env.BUILD_URL}testReport)
${failure.fullDisplayName} [Link to Jenkins](${failure.url}) +""" -``` -${failure.stdOut} -``` -
+ if (failure.stdOut) { + messages << "\n#### Standard Out\n```\n${failure.stdOut}\n```" + } ---- - """ + if (failure.stdErr) { + messages << "\n#### Standard Error\n```\n${failure.stdErr}\n```" + } + + if (failure.stacktrace) { + messages << "\n#### Stack Trace\n```\n${failure.stacktrace}\n```" + } + + messages << "\n\n---" } if (failures.size() > 3) {