mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
This commit is contained in:
parent
cc52f497ea
commit
3b52b5c7c9
2 changed files with 16 additions and 5 deletions
|
@ -24,8 +24,8 @@ timeout(time: 150, unit: 'MINUTES') {
|
|||
ansiColor('xterm') {
|
||||
catchError {
|
||||
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}"]) {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue