From 2a330c5c33d80019728b6814b8101e9a039d4438 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Mon, 25 Jul 2022 12:22:05 +0200 Subject: [PATCH] ci: Discord notification for master build failrues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- ci/Jenkinsfile.combined | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/ci/Jenkinsfile.combined b/ci/Jenkinsfile.combined index ba9c378611..c4e4f2b5f3 100644 --- a/ci/Jenkinsfile.combined +++ b/ci/Jenkinsfile.combined @@ -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: