Fix Jenkins Discord and IRC notifications

This commit is contained in:
RichardG867
2021-11-14 20:51:01 -03:00
parent 9edd0a4d2d
commit 5fb7141cc2

17
.ci/Jenkinsfile vendored
View File

@@ -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()
}
}
}
}