chore(ci): reuse discord send function from library
Provides more info and requires less boilerplate. Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
2259f92ed3
commit
1410b03dd3
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.8.3'
|
||||
library 'status-jenkins-lib@v1.8.6'
|
||||
|
||||
/* Object to store public URLs for description. */
|
||||
urls = [:]
|
||||
|
@ -86,24 +86,10 @@ pipeline {
|
|||
archiveArtifacts('pkg/*')
|
||||
} }
|
||||
failure { script {
|
||||
withCredentials([
|
||||
string(
|
||||
credentialsId: 'discord-status-desktop-webhook',
|
||||
variable: 'DISCORD_WEBHOOK'
|
||||
),
|
||||
]) {
|
||||
discordSend(
|
||||
title: "${env.JOB_NAME}#${env.BUILD_NUMBER}",
|
||||
description: """
|
||||
CI Desktop build Failure!
|
||||
Branch: `${GIT_BRANCH}`
|
||||
Commit: `${GIT_COMMIT.take(8)}`
|
||||
""",
|
||||
link: env.BUILD_URL,
|
||||
result: currentBuild.currentResult,
|
||||
webhookURL: env.DISCORD_WEBHOOK
|
||||
)
|
||||
}
|
||||
discord.send(
|
||||
header: 'CI Desktop build Failure!',
|
||||
cred: 'discord-status-desktop-webhook',
|
||||
)
|
||||
} }
|
||||
cleanup { cleanWs() }
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue