Add branch condition to Discord notification stage

The Discord notification stage now runs only on 'main' or 'master' branches. This helps to avoid unnecessary notifications for feature or bugfix branches.
This commit is contained in:
Teriuihi 2024-08-11 18:10:36 +02:00
parent 1dbb80e5a2
commit 47f6eebd8b

6
Jenkinsfile vendored
View File

@ -12,6 +12,12 @@ pipeline {
}
}
stage('discord') {
when {
anyOf {
branch 'main'
branch 'master'
}
}
steps {
discordSend description: "Build: ${BUILD_NUMBER}", showChangeset: true, result: currentBuild.currentResult, title: currentBuild.fullProjectName, webhookURL: env.discordwebhook
}