Skip to content

Commit

Permalink
feat(ci): send emails to slack on e2e failure (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua-Anderson authored Jul 25, 2016
1 parent 32177aa commit 5615bb4
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,25 @@ waitUntil {
}
true
} catch(error) {
input "Retry the e2e tests?"
false
node('linux') {
withCredentials([[$class: 'StringBinding', credentialsId: '8a727911-596f-4057-97c2-b9e23de5268d', variable: 'SLACKEMAIL']]) {
mail body: """<!DOCTYPE html>
<html>
<head>
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type' />
</head>
<body>
<div>Author: ${env.CHANGE_AUTHOR}<br/>
Branch: ${env.BRANCH_NAME}<br/>
Commit: ${env.CHANGE_TITLE}<br/>
<a href="${env.BUILD_URL}console">Click here</a> to view logs.</p>
<a href="${env.BUILD_URL}input/">Click here</a> to restart e2e.</p>
</div>
</html>
""", from: '[email protected]', subject: 'Workflow CLI E2E Test Failure', to: env.SLACKEMAIL, mimeType: 'text/html'
}
}
input "Retry the e2e tests?"
false
}
}

0 comments on commit 5615bb4

Please sign in to comment.