@@ -96,6 +96,44 @@ pipeline {
9696 }
9797 }
9898 }
99+ stage(' Publish JDK (Java 17) + MongoDB 7.0' ) {
100+ when {
101+ anyOf {
102+ changeset " ci/openjdk17-mongodb-7.0/**"
103+ changeset " ci/pipeline.properties"
104+ }
105+ }
106+ agent { label ' data' }
107+ options { timeout(time : 30 , unit : ' MINUTES' ) }
108+
109+ steps {
110+ script {
111+ def image = docker. build(" springci/spring-data-with-mongodb-7.0:${ p['java.main.tag']} " , " --build-arg BASE=${ p['docker.java.main.image']} --build-arg MONGODB=${ p['docker.mongodb.7.0.version']} ci/openjdk17-mongodb-7.0/" )
112+ docker. withRegistry(p[' docker.registry' ], p[' docker.credentials' ]) {
113+ image. push()
114+ }
115+ }
116+ }
117+ }
118+ stage(' Publish JDK (Java 20) + MongoDB 7.0' ) {
119+ when {
120+ anyOf {
121+ changeset " ci/openjdk20-mongodb-7.0/**"
122+ changeset " ci/pipeline.properties"
123+ }
124+ }
125+ agent { label ' data' }
126+ options { timeout(time : 30 , unit : ' MINUTES' ) }
127+
128+ steps {
129+ script {
130+ def image = docker. build(" springci/spring-data-with-mongodb-7.0:${ p['java.next.tag']} " , " --build-arg BASE=${ p['docker.java.next.image']} --build-arg MONGODB=${ p['docker.mongodb.7.0.version']} ci/openjdk20-mongodb-7.0/" )
131+ docker. withRegistry(p[' docker.registry' ], p[' docker.credentials' ]) {
132+ image. push()
133+ }
134+ }
135+ }
136+ }
99137 }
100138 }
101139
@@ -137,7 +175,6 @@ pipeline {
137175 }
138176 }
139177 parallel {
140-
141178 stage(" test: MongoDB 5.0 (main)" ) {
142179 agent {
143180 label ' data'
@@ -203,6 +240,50 @@ pipeline {
203240 }
204241 }
205242 }
243+
244+ stage(" test: MongoDB 7.0 (main)" ) {
245+ agent {
246+ label ' data'
247+ }
248+ options { timeout(time : 30 , unit : ' MINUTES' ) }
249+ environment {
250+ ARTIFACTORY = credentials(" ${ p['artifactory.credentials']} " )
251+ }
252+ steps {
253+ script {
254+ docker. image(" harbor-repo.vmware.com/dockerhub-proxy-cache/springci/spring-data-with-mongodb-7.0:${ p['java.main.tag']} " ). inside(p[' docker.java.inside.basic' ]) {
255+ sh ' mkdir -p /tmp/mongodb/db /tmp/mongodb/log'
256+ sh ' mongod --setParameter transactionLifetimeLimitSeconds=90 --setParameter maxTransactionLockRequestTimeoutMillis=10000 --dbpath /tmp/mongodb/db --replSet rs0 --fork --logpath /tmp/mongodb/log/mongod.log &'
257+ sh ' sleep 10'
258+ sh ' mongosh --eval "rs.initiate({_id: \' rs0\' , members:[{_id: 0, host: \' 127.0.0.1:27017\' }]});"'
259+ sh ' sleep 15'
260+ 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'
261+ }
262+ }
263+ }
264+ }
265+
266+ stage(" test: MongoDB 7.0 (next)" ) {
267+ agent {
268+ label ' data'
269+ }
270+ options { timeout(time : 30 , unit : ' MINUTES' ) }
271+ environment {
272+ ARTIFACTORY = credentials(" ${ p['artifactory.credentials']} " )
273+ }
274+ steps {
275+ script {
276+ docker. image(" harbor-repo.vmware.com/dockerhub-proxy-cache/springci/spring-data-with-mongodb-7.0:${ p['java.next.tag']} " ). inside(p[' docker.java.inside.basic' ]) {
277+ sh ' mkdir -p /tmp/mongodb/db /tmp/mongodb/log'
278+ sh ' mongod --setParameter transactionLifetimeLimitSeconds=90 --setParameter maxTransactionLockRequestTimeoutMillis=10000 --dbpath /tmp/mongodb/db --replSet rs0 --fork --logpath /tmp/mongodb/log/mongod.log &'
279+ sh ' sleep 10'
280+ sh ' mongosh --eval "rs.initiate({_id: \' rs0\' , members:[{_id: 0, host: \' 127.0.0.1:27017\' }]});"'
281+ sh ' sleep 15'
282+ 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'
283+ }
284+ }
285+ }
286+ }
206287 }
207288 }
208289
0 commit comments