Add branch condition to Discord notification stage
Previously, the Discord notification was sent for all branches. Now, the notification will only be sent for builds on the 'main' or 'master' branches, reducing unnecessary notifications.
This commit is contained in:
parent
973b6b5e7d
commit
7407372b03
4
Jenkinsfile
vendored
4
Jenkinsfile
vendored
|
|
@ -55,6 +55,10 @@ pipeline {
|
|||
}
|
||||
}
|
||||
stage('discord') {
|
||||
when {
|
||||
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