Skip to content

Commit

Permalink
Filter out scm checkout errors since they fail all the time
Browse files Browse the repository at this point in the history
  • Loading branch information
brianseeders committed Mar 20, 2020
1 parent 8096d08 commit 14c21b0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion vars/githubPr.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def getNextCommentMessage(previousCommentInfo = [:]) {
* [Interpreting CI Failures](https://www.elastic.co/guide/en/kibana/current/interpreting-ci-failures.html)
"""

def steps = jenkinsApi.getFailedSteps()
def steps = getFailedSteps()
if (steps?.size() > 0) {
def list = steps.collect { "* [${it.displayName}](${it.logs})" }.join("\n")
messages << "### Failed CI Steps\n${list}"
Expand Down Expand Up @@ -228,3 +228,9 @@ def deleteComment(commentId) {
def getCommitHash() {
return env.ghprbActualCommit
}

def getFailedSteps() {
return jenkinsApi.getFailedSteps()?.findAll { step ->
step.displayName != 'Check out from version control'
}
}

0 comments on commit 14c21b0

Please sign in to comment.