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'