diff --git a/Jenkinsfile b/Jenkinsfile index 55f7e3e6a5..cd09eaf38b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -44,7 +44,9 @@ pipeline { parameters { choice(name: 'nodeLabel', choices: ['ubuntu', 's390x', 'arm', 'Windows']) choice(name: 'jdkVersion', choices: ['jdk_17_latest', 'jdk_21_latest', 'jdk_22_latest', 'jdk_17_latest_windows', 'jdk_21_latest_windows', 'jdk_22_latest_windows']) + booleanParam(name: 'deployEnabled', defaultValue: true) booleanParam(name: 'sonarEnabled', defaultValue: false) + booleanParam(name: 'testsEnabled', defaultValue: true) } stages { @@ -122,6 +124,7 @@ pipeline { tools { jdk params.jdkVersion } + when { expression { return params.testsEnabled } } steps { echo 'Running tests' sh 'java -version' @@ -144,7 +147,7 @@ pipeline { } when { expression { - env.BRANCH_NAME ==~ /(activemq-5.18.x|activemq-5.17.x|main)/ + params.deployEnabled && env.BRANCH_NAME ==~ /(activemq-5.18.x|activemq-5.17.x|main)/ } } steps {