Refactor conditional stage in Jenkinsfile

Updated the 'discord' stage condition to use 'anyOf' for more readable and maintainable branch checks. This change enhances the clarity of branch conditions, ensuring it triggers on either the 'main' or 'master' branches.
This commit is contained in:
Teriuihi 2024-08-08 20:38:05 +02:00
parent 7407372b03
commit 960fc1707b

6
Jenkinsfile vendored
View File

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