Skip to content

Commit 8d650ca

Browse files
committed
Test against Java 20 on CI.
See #4350.
1 parent b9a23ba commit 8d650ca

File tree

4 files changed

+25
-135
lines changed

4 files changed

+25
-135
lines changed

Jenkinsfile

+25-65
Original file line numberDiff line numberDiff line change
@@ -18,69 +18,7 @@ pipeline {
1818
}
1919

2020
stages {
21-
stage("Docker images") {
22-
parallel {
23-
stage('Publish JDK (Java 17) + MongoDB 4.4') {
24-
when {
25-
anyOf {
26-
changeset "ci/openjdk17-mongodb-4.4/**"
27-
changeset "ci/pipeline.properties"
28-
}
29-
}
30-
agent { label 'data' }
31-
options { timeout(time: 30, unit: 'MINUTES') }
32-
33-
steps {
34-
script {
35-
def image = docker.build("springci/spring-data-with-mongodb-4.4:${p['java.main.tag']}", "--build-arg BASE=${p['docker.java.main.image']} --build-arg MONGODB=${p['docker.mongodb.4.4.version']} ci/openjdk17-mongodb-4.4/")
36-
docker.withRegistry(p['docker.registry'], p['docker.credentials']) {
37-
image.push()
38-
}
39-
}
40-
}
41-
}
42-
stage('Publish JDK (Java 17) + MongoDB 5.0') {
43-
when {
44-
anyOf {
45-
changeset "ci/openjdk17-mongodb-5.0/**"
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-mongodb-5.0:${p['java.main.tag']}", "--build-arg BASE=${p['docker.java.main.image']} --build-arg MONGODB=${p['docker.mongodb.5.0.version']} ci/openjdk17-mongodb-5.0/")
55-
docker.withRegistry(p['docker.registry'], p['docker.credentials']) {
56-
image.push()
57-
}
58-
}
59-
}
60-
}
61-
stage('Publish JDK (Java 17) + MongoDB 6.0') {
62-
when {
63-
anyOf {
64-
changeset "ci/openjdk17-mongodb-6.0/**"
65-
changeset "ci/pipeline.properties"
66-
}
67-
}
68-
agent { label 'data' }
69-
options { timeout(time: 30, unit: 'MINUTES') }
70-
71-
steps {
72-
script {
73-
def image = docker.build("springci/spring-data-with-mongodb-6.0:${p['java.main.tag']}", "--build-arg BASE=${p['docker.java.main.image']} --build-arg MONGODB=${p['docker.mongodb.6.0.version']} ci/openjdk17-mongodb-6.0/")
74-
docker.withRegistry(p['docker.registry'], p['docker.credentials']) {
75-
image.push()
76-
}
77-
}
78-
}
79-
}
80-
}
81-
}
82-
83-
stage("test: baseline (Java 17)") {
21+
stage("test: baseline (main)") {
8422
when {
8523
beforeAgent(true)
8624
anyOf {
@@ -119,7 +57,7 @@ pipeline {
11957
}
12058
parallel {
12159

122-
stage("test: MongoDB 5.0 (Java 17)") {
60+
stage("test: MongoDB 5.0 (main)") {
12361
agent {
12462
label 'data'
12563
}
@@ -141,7 +79,7 @@ pipeline {
14179
}
14280
}
14381

144-
stage("test: MongoDB 6.0 (Java 17)") {
82+
stage("test: MongoDB 6.0 (main)") {
14583
agent {
14684
label 'data'
14785
}
@@ -162,6 +100,28 @@ pipeline {
162100
}
163101
}
164102
}
103+
104+
stage("test: MongoDB 6.0 (next)") {
105+
agent {
106+
label 'data'
107+
}
108+
options { timeout(time: 30, unit: 'MINUTES') }
109+
environment {
110+
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
111+
}
112+
steps {
113+
script {
114+
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']) {
115+
sh 'mkdir -p /tmp/mongodb/db /tmp/mongodb/log'
116+
sh 'mongod --setParameter transactionLifetimeLimitSeconds=90 --setParameter maxTransactionLockRequestTimeoutMillis=10000 --dbpath /tmp/mongodb/db --replSet rs0 --fork --logpath /tmp/mongodb/log/mongod.log &'
117+
sh 'sleep 10'
118+
sh 'mongosh --eval "rs.initiate({_id: \'rs0\', members:[{_id: 0, host: \'127.0.0.1:27017\'}]});"'
119+
sh 'sleep 15'
120+
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'
121+
}
122+
}
123+
}
124+
}
165125
}
166126
}
167127

ci/openjdk17-mongodb-4.4/Dockerfile

-22
This file was deleted.

ci/openjdk17-mongodb-5.0/Dockerfile

-24
This file was deleted.

ci/openjdk17-mongodb-6.0/Dockerfile

-24
This file was deleted.

0 commit comments

Comments
 (0)