@@ -77,10 +77,29 @@ pipeline {
7777 }
7878 }
7979 }
80+ stage(' Publish JDK (Java 20) + MongoDB 6.0' ) {
81+ when {
82+ anyOf {
83+ changeset " ci/openjdk20-mongodb-6.0/**"
84+ changeset " ci/pipeline.properties"
85+ }
86+ }
87+ agent { label ' data' }
88+ options { timeout(time : 30 , unit : ' MINUTES' ) }
89+
90+ steps {
91+ script {
92+ def image = docker. build(" springci/spring-data-with-mongodb-6.0:${ p['java.next.tag']} " , " --build-arg BASE=${ p['docker.java.next.image']} --build-arg MONGODB=${ p['docker.mongodb.6.0.version']} ci/openjdk20-mongodb-6.0/" )
93+ docker. withRegistry(p[' docker.registry' ], p[' docker.credentials' ]) {
94+ image. push()
95+ }
96+ }
97+ }
98+ }
8099 }
81100 }
82101
83- stage(" test: baseline (Java 17 )" ) {
102+ stage(" test: baseline (main )" ) {
84103 when {
85104 beforeAgent(true )
86105 anyOf {
@@ -119,7 +138,7 @@ pipeline {
119138 }
120139 parallel {
121140
122- stage(" test: MongoDB 5.0 (Java 17 )" ) {
141+ stage(" test: MongoDB 5.0 (main )" ) {
123142 agent {
124143 label ' data'
125144 }
@@ -141,7 +160,7 @@ pipeline {
141160 }
142161 }
143162
144- stage(" test: MongoDB 6.0 (Java 17 )" ) {
163+ stage(" test: MongoDB 6.0 (main )" ) {
145164 agent {
146165 label ' data'
147166 }
@@ -162,6 +181,28 @@ pipeline {
162181 }
163182 }
164183 }
184+
185+ stage(" test: MongoDB 6.0 (next)" ) {
186+ agent {
187+ label ' data'
188+ }
189+ options { timeout(time : 30 , unit : ' MINUTES' ) }
190+ environment {
191+ ARTIFACTORY = credentials(" ${ p['artifactory.credentials']} " )
192+ }
193+ steps {
194+ script {
195+ docker. image(" harbor-repo.vmware.com/dockerhub-proxy-cache/springci/spring-data-with-mongodb-6.0:${ p['java.next.tag']} " ). inside(p[' docker.java.inside.basic' ]) {
196+ sh ' mkdir -p /tmp/mongodb/db /tmp/mongodb/log'
197+ sh ' mongod --setParameter transactionLifetimeLimitSeconds=90 --setParameter maxTransactionLockRequestTimeoutMillis=10000 --dbpath /tmp/mongodb/db --replSet rs0 --fork --logpath /tmp/mongodb/log/mongod.log &'
198+ sh ' sleep 10'
199+ sh ' mongosh --eval "rs.initiate({_id: \' rs0\' , members:[{_id: 0, host: \' 127.0.0.1:27017\' }]});"'
200+ sh ' sleep 15'
201+ sh ' MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml clean dependency:list test -Duser.name=jenkins -Dsort -U -B'
202+ }
203+ }
204+ }
205+ }
165206 }
166207 }
167208
0 commit comments