ci: Discord notification for master build failrues

To make this not send 3 separate notifications for each platform we
build for I've created a special job just for building `master` branch:
https://ci.status.im/job/status-desktop/job/master/

For more details see:
https://plugins.jenkins.io/discord-notifier/

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2022-07-25 12:22:05 +02:00
parent 84522bd7fe
commit 2a330c5c33
No known key found for this signature in database
GPG Key ID: 09AA5403E54D9931
1 changed files with 22 additions and 0 deletions

View File

@ -74,6 +74,28 @@ pipeline {
} }
}
}
post {
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: 'https://discord.com/api/webhooks/1001147901159940146/irrmzHsCDtgYXAg8Y4Svjt802GRKLHTLTxCFOyUnLIb3_vtVho0BEQQddVEQjm3JuVwE'
)
}
} }
}
}
/* Helper that makes PUBLISH default to 'false' unless: