[AMQ-9539] Make tests and deploy configurable

This commit is contained in:
Matt Pavlovich 2024-07-24 08:46:55 -05:00 committed by Matt Pavlovich
parent 03a9771fe4
commit ff543d3133
1 changed files with 4 additions and 1 deletions

5
Jenkinsfile vendored
View File

@ -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 {