From 960fc1707b6bf63208587f76b1f8df7fe64dee37 Mon Sep 17 00:00:00 2001 From: Teriuihi Date: Thu, 8 Aug 2024 20:38:05 +0200 Subject: [PATCH] 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. --- Jenkinsfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 46e4145..793e453 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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