From a59e802c87ed847dedac588017ed68023bc936af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Perdomo?= Date: Mon, 29 Jan 2024 16:45:24 +0100 Subject: [PATCH] IM-98 Only deploy `develop` or `master` builds --- Jenkinsfile | 5 +++++ Jenkinsfile.withParams | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index c27df438a..3b346c34d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -95,6 +95,11 @@ pipeline { } stage('Maven deploy') { + when { + branch { + anyOf { branch 'develop'; branch 'master' } + } + } steps { configFileProvider([configFile(fileId: '1f5f24a2-9839-4194-b2ad-0613279f9fba', variable: 'MAVEN_SETTINGS_XML')]) { sh './mvnw --settings $MAVEN_SETTINGS_XML deploy -pl :api -DskipTests' diff --git a/Jenkinsfile.withParams b/Jenkinsfile.withParams index 961e3d718..47a3d5240 100644 --- a/Jenkinsfile.withParams +++ b/Jenkinsfile.withParams @@ -165,6 +165,11 @@ pipeline { } stage('Maven deploy') { + when { + branch { + anyOf { branch 'develop'; branch 'master' } + } + } steps { configFileProvider([configFile(fileId: '1f5f24a2-9839-4194-b2ad-0613279f9fba', variable: 'MAVEN_SETTINGS_XML')]) { sh './mvnw --settings $MAVEN_SETTINGS_XML deploy -pl :api -DskipTests'