From 47f6eebd8b6487de7fffb85fa9995d96ef691f8a Mon Sep 17 00:00:00 2001 From: Teriuihi Date: Sun, 11 Aug 2024 18:10:36 +0200 Subject: [PATCH] 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. --- Jenkinsfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index ceed21f..0a0c949 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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 }