[QA] slack notify on failure (#68126)

This commit is contained in:
Tre 2020-06-05 10:49:06 -06:00 committed by GitHub
parent c98cfda890
commit 5bfd704dd8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,8 +11,11 @@ kibanaPipeline(timeoutMinutes: 240) {
'CODE_COVERAGE=1', // Enables coverage. Needed for multiple ci scripts, such as remote.ts, test/scripts/*.sh, schema.js, etc.
]) {
workers.base(name: 'coverage-worker', size: 'l', ramDisk: false, bootstrapped: false) {
kibanaCoverage.runTests()
handleIngestion(TIME_STAMP)
catchError {
kibanaCoverage.runTests()
handleIngestion(TIME_STAMP)
}
handleFail()
}
}
kibanaPipeline.sendMail()
@ -29,4 +32,13 @@ def handleIngestion(timestamp) {
kibanaCoverage.uploadCoverageStaticSite(timestamp)
}
def handleFail() {
def buildStatus = buildUtils.getBuildStatus()
if(params.NOTIFY_ON_FAILURE && buildStatus != 'SUCCESS' && buildStatus != 'ABORTED') {
slackNotifications.sendFailedBuild(
channel: '#kibana-qa',
username: 'Kibana QA'
)
}
}