diff --git a/.ci/es-snapshots/Jenkinsfile_verify_es b/.ci/es-snapshots/Jenkinsfile_verify_es index c87ca013543153..a6fe980242afe1 100644 --- a/.ci/es-snapshots/Jenkinsfile_verify_es +++ b/.ci/es-snapshots/Jenkinsfile_verify_es @@ -22,8 +22,8 @@ def SNAPSHOT_MANIFEST = "https://storage.googleapis.com/kibana-ci-es-snapshots-d kibanaPipeline(timeoutMinutes: 150) { catchErrors { slackNotifications.onFailure( - title: ":broken_heart: *<${env.BUILD_URL}|[${SNAPSHOT_VERSION}] ES Snapshot Verification Failure>*", - message: ":broken_heart: [${SNAPSHOT_VERSION}] ES Snapshot Verification Failure", + title: "*<${env.BUILD_URL}|[${SNAPSHOT_VERSION}] ES Snapshot Verification Failure>*", + message: "[${SNAPSHOT_VERSION}] ES Snapshot Verification Failure", ) { retryable.enable(2) withEnv(["ES_SNAPSHOT_MANIFEST=${SNAPSHOT_MANIFEST}"]) { diff --git a/vars/slackNotifications.groovy b/vars/slackNotifications.groovy index 0eea6640d0831d..c50a99d3e335c5 100644 --- a/vars/slackNotifications.groovy +++ b/vars/slackNotifications.groovy @@ -79,18 +79,29 @@ def getDefaultContext() { ].join(' ยท ')) } +def getStatusIcon() { + def status = buildUtils.getBuildStatus() + if (status == 'UNSTABLE') { + return ':yellow_heart:' + } + + return ':broken_heart:' +} + def sendFailedBuild(Map params = [:]) { def config = [ channel: '#kibana-operations-alerts', - title: ":broken_heart: *<${env.BUILD_URL}|${getDefaultDisplayName()}>*", - message: ":broken_heart: ${getDefaultDisplayName()}", + title: "*<${env.BUILD_URL}|${getDefaultDisplayName()}>*", + message: getDefaultDisplayName(), color: 'danger', icon: ':jenkins:', username: 'Kibana Operations', context: getDefaultContext(), ] + params - def blocks = [markdownBlock(config.title)] + def title = "${getStatusIcon()} ${config.title}" + + def blocks = [markdownBlock(title)] getFailedBuildBlocks().each { blocks << it } blocks << dividerBlock() blocks << config.context