From 5fb7141cc2353c92898a2eda127c971fecfee58e Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Sun, 14 Nov 2021 20:51:01 -0300 Subject: [PATCH] Fix Jenkins Discord and IRC notifications --- .ci/Jenkinsfile | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.ci/Jenkinsfile b/.ci/Jenkinsfile index 43a554705..a279e4932 100644 --- a/.ci/Jenkinsfile +++ b/.ci/Jenkinsfile @@ -138,8 +138,21 @@ pipeline { } if (!env.JOB_BASE_NAME.contains("TestBuildPleaseIgnore")) { - discordSend webhookURL: DISCORD_WEBHOOK_URL - ircNotify() + try { + def result = currentBuild.currentResult.toLowerCase() + discordSend webhookURL: DISCORD_WEBHOOK_URL, + title: "${env.JOB_BASE_NAME} #${env.BUILD_NUMBER}", + url: env.BUILD_URL, + description: "**Status:** ${result}\n\u2060", /* word joiner forces a blank line */ + enableArtifactsList: false, + showChangeset: true + + node { /* IRC notifications need a node for whatever reason */ + ircNotify() + } + } catch (Exception e) { + e.printStackTrace() + } } } }