diff --git a/.ci/Jenkinsfile_coverage b/.ci/Jenkinsfile_coverage index 3f4732f15f33..650ef94e1d3d 100644 --- a/.ci/Jenkinsfile_coverage +++ b/.ci/Jenkinsfile_coverage @@ -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' + ) + } +}