You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ma...@apache.org on 2023/10/20 22:04:38 UTC
[activemq] branch main updated: [AMQ-9351] Add JDK version as a choice for build runs
This is an automated email from the ASF dual-hosted git repository.
mattrpav pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq.git
The following commit(s) were added to refs/heads/main by this push:
new 8e0f077fb [AMQ-9351] Add JDK version as a choice for build runs
8e0f077fb is described below
commit 8e0f077fb0b223d8e969a04cd20d622bcf374bdd
Author: Matt Pavlovich <ma...@hyte.io>
AuthorDate: Fri Oct 20 16:27:08 2023 -0500
[AMQ-9351] Add JDK version as a choice for build runs
---
Jenkinsfile | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index 59c0086d3..a526d01f9 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -30,7 +30,7 @@ pipeline {
tools {
// ... tell Jenkins what java version, maven version or other tools are required ...
maven 'maven_3_latest'
- jdk 'jdk_17_latest'
+ jdk params.jdkVersion
}
options {
@@ -43,6 +43,7 @@ pipeline {
parameters {
choice(name: 'nodeLabel', choices: ['ubuntu', 's390x'])
+ choice(name: 'jdkVersion', choices: ['jdk_17_latest', 'jdk_21_latest'])
}
stages {
@@ -93,15 +94,25 @@ pipeline {
}
stage('Verify') {
+ tools {
+ jdk params.jdkVersion
+ }
steps {
echo 'Running apache-rat:check'
+ sh 'java -version'
+ sh 'mvn -version'
sh 'mvn apache-rat:check'
}
}
stage('Tests') {
+ tools {
+ jdk params.jdkVersion
+ }
steps {
echo 'Running tests'
+ sh 'java -version'
+ sh 'mvn -version'
// all tests is very very long (10 hours on Apache Jenkins)
// sh 'mvn -B -e test -pl activemq-unit-tests -Dactivemq.tests=all'
sh 'mvn -B -e -fae test -Dsurefire.rerunFailingTestsCount=3'
@@ -115,6 +126,9 @@ pipeline {
}
stage('Deploy') {
+ tools {
+ jdk params.jdkVersion
+ }
when {
expression {
env.BRANCH_NAME ==~ /(activemq-5.18.x|activemq-5.17.x|main)/
@@ -122,6 +136,8 @@ pipeline {
}
steps {
echo 'Deploying'
+ sh 'java -version'
+ sh 'mvn -version'
sh 'mvn -B -e deploy -Pdeploy -DskipTests'
}
}