Skip to content

Commit 5f31304

Browse files
committed
Polishing.
Tweak wording. Remove unused Java 21/Mongo 6 Dockerfile. Move start-server code into shellfile. Remove 7.0/Java 17 test item in favor of Java 21 and old driver variants. See #4785 Original pull request: #4796
1 parent 7fd7fd4 commit 5f31304

File tree

5 files changed

+20
-104
lines changed

5 files changed

+20
-104
lines changed

Jenkinsfile

Lines changed: 5 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -77,25 +77,6 @@ pipeline {
7777
}
7878
}
7979
}
80-
stage('Publish JDK (Java.next) + MongoDB 6.0') {
81-
when {
82-
anyOf {
83-
changeset "ci/openjdk21-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/openjdk21-mongodb-6.0/")
93-
docker.withRegistry(p['docker.registry'], p['docker.credentials']) {
94-
image.push()
95-
}
96-
}
97-
}
98-
}
9980
stage('Publish JDK (Java 17) + MongoDB 7.0') {
10081
when {
10182
anyOf {
@@ -176,11 +157,7 @@ pipeline {
176157
script {
177158
docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) {
178159
docker.image("springci/spring-data-with-mongodb-4.4:${p['java.main.tag']}").inside(p['docker.java.inside.basic']) {
179-
sh 'mkdir -p /tmp/mongodb/db /tmp/mongodb/log'
180-
sh 'mongod --setParameter transactionLifetimeLimitSeconds=90 --setParameter maxTransactionLockRequestTimeoutMillis=10000 --dbpath /tmp/mongodb/db --replSet rs0 --fork --logpath /tmp/mongodb/log/mongod.log &'
181-
sh 'sleep 10'
182-
sh 'mongo --eval "rs.initiate({_id: \'rs0\', members:[{_id: 0, host: \'127.0.0.1:27017\'}]});"'
183-
sh 'sleep 15'
160+
sh 'ci/start-replica.sh'
184161
sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' +
185162
"./mvnw -s settings.xml clean dependency:list test -Dsort -U -B"
186163
}
@@ -211,11 +188,7 @@ pipeline {
211188
script {
212189
docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) {
213190
docker.image("springci/spring-data-with-mongodb-5.0:${p['java.main.tag']}").inside(p['docker.java.inside.basic']) {
214-
sh 'mkdir -p /tmp/mongodb/db /tmp/mongodb/log'
215-
sh 'mongod --setParameter transactionLifetimeLimitSeconds=90 --setParameter maxTransactionLockRequestTimeoutMillis=10000 --dbpath /tmp/mongodb/db --replSet rs0 --fork --logpath /tmp/mongodb/log/mongod.log &'
216-
sh 'sleep 10'
217-
sh 'mongo --eval "rs.initiate({_id: \'rs0\', members:[{_id: 0, host: \'127.0.0.1:27017\'}]});"'
218-
sh 'sleep 15'
191+
sh 'ci/start-replica.sh'
219192
sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' +
220193
"./mvnw -s settings.xml clean dependency:list test -Dsort -U -B"
221194
}
@@ -237,37 +210,7 @@ pipeline {
237210
script {
238211
docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) {
239212
docker.image("springci/spring-data-with-mongodb-6.0:${p['java.main.tag']}").inside(p['docker.java.inside.basic']) {
240-
sh 'mkdir -p /tmp/mongodb/db /tmp/mongodb/log'
241-
sh 'mongod --setParameter transactionLifetimeLimitSeconds=90 --setParameter maxTransactionLockRequestTimeoutMillis=10000 --dbpath /tmp/mongodb/db --replSet rs0 --fork --logpath /tmp/mongodb/log/mongod.log &'
242-
sh 'sleep 10'
243-
sh 'mongosh --eval "rs.initiate({_id: \'rs0\', members:[{_id: 0, host: \'127.0.0.1:27017\'}]});"'
244-
sh 'sleep 15'
245-
sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' +
246-
"./mvnw -s settings.xml clean dependency:list test -Dsort -U -B"
247-
}
248-
}
249-
}
250-
}
251-
}
252-
253-
stage("test: MongoDB 7.0 (main)") {
254-
agent {
255-
label 'data'
256-
}
257-
options { timeout(time: 30, unit: 'MINUTES') }
258-
environment {
259-
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
260-
DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}")
261-
}
262-
steps {
263-
script {
264-
docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) {
265-
docker.image("springci/spring-data-with-mongodb-7.0:${p['java.main.tag']}").inside(p['docker.java.inside.basic']) {
266-
sh 'mkdir -p /tmp/mongodb/db /tmp/mongodb/log'
267-
sh 'mongod --setParameter transactionLifetimeLimitSeconds=90 --setParameter maxTransactionLockRequestTimeoutMillis=10000 --dbpath /tmp/mongodb/db --replSet rs0 --fork --logpath /tmp/mongodb/log/mongod.log &'
268-
sh 'sleep 10'
269-
sh 'mongosh --eval "rs.initiate({_id: \'rs0\', members:[{_id: 0, host: \'127.0.0.1:27017\'}]});"'
270-
sh 'sleep 15'
213+
sh 'ci/start-replica.sh'
271214
sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' +
272215
"./mvnw -s settings.xml clean dependency:list test -Dsort -U -B"
273216
}
@@ -289,11 +232,7 @@ pipeline {
289232
script {
290233
docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) {
291234
docker.image("springci/spring-data-with-mongodb-7.0:${p['java.main.tag']}").inside(p['docker.java.inside.basic']) {
292-
sh 'mkdir -p /tmp/mongodb/db /tmp/mongodb/log'
293-
sh 'mongod --setParameter transactionLifetimeLimitSeconds=90 --setParameter maxTransactionLockRequestTimeoutMillis=10000 --dbpath /tmp/mongodb/db --replSet rs0 --fork --logpath /tmp/mongodb/log/mongod.log &'
294-
sh 'sleep 10'
295-
sh 'mongosh --eval "rs.initiate({_id: \'rs0\', members:[{_id: 0, host: \'127.0.0.1:27017\'}]});"'
296-
sh 'sleep 15'
235+
sh 'ci/start-replica.sh'
297236
sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' +
298237
"./mvnw -s settings.xml -Pmongo-4.x clean dependency:list test -Dsort -U -B -Dgradle.cache.local.enabled=false -Dgradle.cache.remote.enabled=false"
299238
}
@@ -315,11 +254,7 @@ pipeline {
315254
script {
316255
docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) {
317256
docker.image("springci/spring-data-with-mongodb-7.0:${p['java.next.tag']}").inside(p['docker.java.inside.basic']) {
318-
sh 'mkdir -p /tmp/mongodb/db /tmp/mongodb/log'
319-
sh 'mongod --setParameter transactionLifetimeLimitSeconds=90 --setParameter maxTransactionLockRequestTimeoutMillis=10000 --dbpath /tmp/mongodb/db --replSet rs0 --fork --logpath /tmp/mongodb/log/mongod.log &'
320-
sh 'sleep 10'
321-
sh 'mongosh --eval "rs.initiate({_id: \'rs0\', members:[{_id: 0, host: \'127.0.0.1:27017\'}]});"'
322-
sh 'sleep 15'
257+
sh 'ci/start-replica.sh'
323258
sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' +
324259
"./mvnw -s settings.xml clean dependency:list test -Dsort -U -B"
325260
}

ci/openjdk17-mongodb-8.0/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ENV MONGO_VERSION=${MONGODB}
1010
RUN set -eux; \
1111
sed -i -e 's/archive.ubuntu.com/mirror.one.com/g' /etc/apt/sources.list && \
1212
sed -i -e 's/security.ubuntu.com/mirror.one.com/g' /etc/apt/sources.list && \
13-
sed -i -e 's/ports.ubuntu.com/mirrors.ocf.berkeley.edu/g' /etc/apt/sources.list && \
13+
sed -i -e 's/ports.ubuntu.com/mirrors.ocf.berkeley.edu/g' /etc/apt/sources.list && \
1414
sed -i -e 's/http/https/g' /etc/apt/sources.list && \
1515
apt-get update && apt-get install -y apt-transport-https apt-utils gnupg2 wget && \
1616
# MongoDB 8.0 release signing key

ci/openjdk21-mongodb-6.0/Dockerfile

Lines changed: 0 additions & 25 deletions
This file was deleted.

ci/start-replica.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
mkdir -p /tmp/mongodb/db /tmp/mongodb/log
3+
mongod --setParameter transactionLifetimeLimitSeconds=90 --setParameter maxTransactionLockRequestTimeoutMillis=10000 --dbpath /tmp/mongodb/db --replSet rs0 --fork --logpath /tmp/mongodb/log/mongod.log &
4+
sleep 10
5+
mongosh --eval "rs.initiate({_id: 'rs0', members:[{_id: 0, host: '127.0.0.1:27017'}]});"
6+
sleep 15

src/main/antora/modules/ROOT/pages/preface.adoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,37 +25,37 @@ See also the https://www.mongodb.com/docs/drivers/java/sync/current/compatibilit
2525
|2024.1
2626
|4.4.x
2727
|5.x
28-
|4.4.x, 5.x, 6.x, 7.x, 8.x
28+
|4.4.x to 8.x
2929
3030
|2024.0
3131
|4.3.x
3232
|4.11.x & 5.x
33-
|4.4.x, 5.x, 6.x, 7.x
33+
|4.4.x to 7.x
3434
3535
|2023.1
3636
|4.2.x
3737
|4.9.x
38-
|4.4.x, 5.x, 6.x, 7.x
38+
|4.4.x to 7.x
3939
4040
|2023.0 (*)
4141
|4.1.x
4242
|4.9.x
43-
|4.4.x, 5.x, 6.x
43+
|4.4.x to 6.x
4444
4545
|2022.0 (*)
4646
|4.0.x
4747
|4.7.x
48-
|4.4.x, 5.x, 6.x
48+
|4.4.x to 6.x
4949
5050
|2021.2 (*)
5151
|3.4.x
5252
|4.6.x
53-
|4.4.x, 5.0.x
53+
|4.4.x to 5.0.x
5454
5555
|2021.1 (*)
5656
|3.3.x
5757
|4.4.x
58-
|4.4.x, 5.0.x
58+
|4.4.x to 5.0.x
5959
6060
|2021.0 (*)
6161
|3.2.x
@@ -83,7 +83,7 @@ See also the https://www.mongodb.com/docs/drivers/java/sync/current/compatibilit
8383
|4.0.x
8484
8585
|===
86-
(*) End of OSS Support
86+
(*) https://spring.io/projects/spring-data-mongodb#support[End of OSS Support]
8787
====
8888

8989
[[compatibility.changes]]

0 commit comments

Comments
 (0)