11def p = [:]
22node {
3- checkout scm
4- p = readProperties interpolate : true , file : ' ci/pipeline.properties'
3+ checkout scm
4+ p = readProperties interpolate : true , file : ' ci/pipeline.properties'
55}
66
77pipeline {
@@ -22,7 +22,7 @@ pipeline {
2222 parallel {
2323 stage(' Publish JDK 17 + Cassandra 3.11' ) {
2424 when {
25- anyOf {
25+ anyOf {
2626 changeset " ci/openjdk17-8-cassandra-3.11/**"
2727 changeset " ci/pipeline.properties"
2828 }
@@ -39,10 +39,29 @@ pipeline {
3939 }
4040 }
4141 }
42+ stage(' Publish JDK 20 + Cassandra 3.11' ) {
43+ when {
44+ anyOf {
45+ changeset " ci/openjdk20-8-cassandra-3.11/**"
46+ changeset " ci/pipeline.properties"
47+ }
48+ }
49+ agent { label ' data' }
50+ options { timeout(time : 30 , unit : ' MINUTES' ) }
51+
52+ steps {
53+ script {
54+ def image = docker. build(" springci/spring-data-with-cassandra-3.11:${ p['java.next.tag']} " , " --build-arg BASE=${ p['docker.java.next.image']} --build-arg CASSANDRA=${ p['docker.cassandra.3.version']} ci/openjdk20-8-cassandra-3.11/" )
55+ docker. withRegistry(p[' docker.registry' ], p[' docker.credentials' ]) {
56+ image. push()
57+ }
58+ }
59+ }
60+ }
4261 }
4362 }
4463
45- stage(" test: baseline (Java 17 )" ) {
64+ stage(" test: baseline (main )" ) {
4665 when {
4766 beforeAgent(true )
4867 anyOf {
@@ -68,6 +87,36 @@ pipeline {
6887 }
6988 }
7089
90+ stage(" Test other configurations" ) {
91+ when {
92+ beforeAgent(true )
93+ allOf {
94+ branch(pattern : " main|(\\ d\\ .\\ d\\ .x)" , comparator : " REGEXP" )
95+ not { triggeredBy ' UpstreamCause' }
96+ }
97+ }
98+ parallel {
99+ stage(" test: baseline (next)" ) {
100+ agent {
101+ label ' data'
102+ }
103+ options { timeout(time : 30 , unit : ' MINUTES' ) }
104+ environment {
105+ ARTIFACTORY = credentials(" ${ p['artifactory.credentials']} " )
106+ }
107+ steps {
108+ script {
109+ docker. image(" harbor-repo.vmware.com/dockerhub-proxy-cache/springci/spring-data-with-cassandra-3.11:${ p['java.next.tag']} " ). inside(' -v $HOME:/tmp/jenkins-home' ) {
110+ sh ' mkdir -p /tmp/jenkins-home'
111+ sh ' JAVA_HOME=/opt/java/openjdk8 /opt/cassandra/bin/cassandra -R &'
112+ sh ' MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pci,external-cassandra clean dependency:list verify -Dsort -U -B'
113+ }
114+ }
115+ }
116+ }
117+ }
118+ }
119+
71120 stage(' Release to artifactory' ) {
72121 when {
73122 beforeAgent(true )
0 commit comments