@@ -18,69 +18,7 @@ pipeline {
18
18
}
19
19
20
20
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)" ) {
84
22
when {
85
23
beforeAgent(true )
86
24
anyOf {
@@ -119,7 +57,7 @@ pipeline {
119
57
}
120
58
parallel {
121
59
122
- stage(" test: MongoDB 5.0 (Java 17 )" ) {
60
+ stage(" test: MongoDB 5.0 (main )" ) {
123
61
agent {
124
62
label ' data'
125
63
}
@@ -141,7 +79,7 @@ pipeline {
141
79
}
142
80
}
143
81
144
- stage(" test: MongoDB 6.0 (Java 17 )" ) {
82
+ stage(" test: MongoDB 6.0 (main )" ) {
145
83
agent {
146
84
label ' data'
147
85
}
@@ -162,6 +100,28 @@ pipeline {
162
100
}
163
101
}
164
102
}
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
+ }
165
125
}
166
126
}
167
127
0 commit comments