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:
parent
1dbb80e5a2
commit
47f6eebd8b
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user