-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): send emails to slack on e2e failure (#133)
- Loading branch information
1 parent
32177aa
commit 5615bb4
Showing
1 changed file
with
20 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
} | ||
} |