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:
parent
7407372b03
commit
960fc1707b
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user