@@ -55,40 +55,25 @@ pipeline {
55
55
}
56
56
}
57
57
58
- stage(" test: baseline" ) {
58
+ stage(" test: baseline (jdk8) " ) {
59
59
when {
60
60
anyOf {
61
61
branch ' 2.4.x'
62
62
not { triggeredBy ' UpstreamCause' }
63
63
}
64
64
}
65
65
agent {
66
- docker {
67
- image ' springci/spring-data-openjdk8-with-redis-6.0:latest'
68
- label ' data'
69
- args ' -v $HOME/.m2:/tmp/jenkins-home/.m2'
70
- }
66
+ label ' data'
71
67
}
72
68
options { timeout(time : 30 , unit : ' MINUTES' ) }
73
69
steps {
74
- // Create link to directory with Redis binaries
75
- sh ' ln -sf /work'
76
-
77
- // Launch Redis in proper configuration
78
- sh ' make start'
79
-
80
- // Execute maven test
81
- sh ' MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw clean test -DrunLongTests=true -U -B'
82
-
83
- // Capture resulting exit code from maven (pass/fail)
84
- sh ' RESULT=\$ ?'
85
-
86
- // Shutdown Redis
87
- sh ' make stop'
88
-
89
- // Return maven results
90
- sh ' exit \$ RESULT'
91
-
70
+ script {
71
+ docker. withRegistry(' ' , ' hub.docker.com-springbuildmaster' ) {
72
+ docker. image(' springci/spring-data-openjdk8-with-redis-6.0:latest' ). inside(' -v $HOME:/tmp/jenkins-home' ) {
73
+ sh ' PROFILE=none LONG_TESTS=true ci/test.sh'
74
+ }
75
+ }
76
+ }
92
77
}
93
78
}
94
79
@@ -102,32 +87,32 @@ pipeline {
102
87
parallel {
103
88
stage(" test: baseline (jdk11)" ) {
104
89
agent {
105
- docker {
106
- image ' springci/spring-data-openjdk11-with-redis-6.0:latest'
107
- label ' data'
108
- args ' -v $HOME/.m2:/tmp/jenkins-home/.m2'
90
+ label ' data'
91
+ }
92
+ options { timeout(time : 30 , unit : ' MINUTES' ) }
93
+ steps {
94
+ script {
95
+ docker. withRegistry(' ' , ' hub.docker.com-springbuildmaster' ) {
96
+ docker. image(' springci/spring-data-openjdk11-with-redis-6.0:latest' ). inside(' -v $HOME:/tmp/jenkins-home' ) {
97
+ sh ' PROFILE=java11 ci/test.sh'
98
+ }
99
+ }
109
100
}
110
101
}
102
+ }
103
+ stage(" test: baseline (jdk15)" ) {
104
+ agent {
105
+ label ' data'
106
+ }
111
107
options { timeout(time : 30 , unit : ' MINUTES' ) }
112
108
steps {
113
- // Create link to directory with Redis binaries
114
- sh ' ln -sf /work'
115
-
116
- // Launch Redis in proper configuration
117
- sh ' make start'
118
-
119
- // Execute maven test
120
- sh ' MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pjava11 clean test -U -B'
121
-
122
- // Capture resulting exit code from maven (pass/fail)
123
- sh ' RESULT=\$ ?'
124
-
125
- // Shutdown Redis
126
- sh ' make stop'
127
-
128
- // Return maven results
129
- sh ' exit \$ RESULT'
130
-
109
+ script {
110
+ docker. withRegistry(' ' , ' hub.docker.com-springbuildmaster' ) {
111
+ docker. image(' springci/spring-data-openjdk15-with-redis-6.0:latest' ). inside(' -v $HOME:/tmp/jenkins-home' ) {
112
+ sh ' PROFILE=java11 ci/test.sh'
113
+ }
114
+ }
115
+ }
131
116
}
132
117
}
133
118
}
@@ -141,11 +126,7 @@ pipeline {
141
126
}
142
127
}
143
128
agent {
144
- docker {
145
- image ' adoptopenjdk/openjdk8:latest'
146
- label ' data'
147
- args ' -v $HOME/.m2:/tmp/jenkins-home/.m2'
148
- }
129
+ label ' data'
149
130
}
150
131
options { timeout(time : 20 , unit : ' MINUTES' ) }
151
132
@@ -154,14 +135,20 @@ pipeline {
154
135
}
155
136
156
137
steps {
157
- sh ' MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pci,artifactory ' +
158
- ' -Dartifactory.server=https://repo.spring.io ' +
159
- " -Dartifactory.username=${ ARTIFACTORY_USR} " +
160
- " -Dartifactory.password=${ ARTIFACTORY_PSW} " +
161
- " -Dartifactory.staging-repository=libs-snapshot-local " +
162
- " -Dartifactory.build-name=spring-data-redis " +
163
- " -Dartifactory.build-number=${ BUILD_NUMBER} " +
164
- ' -Dmaven.test.skip=true clean deploy -U -B'
138
+ script {
139
+ docker. withRegistry(' ' , ' hub.docker.com-springbuildmaster' ) {
140
+ docker. image(' adoptopenjdk/openjdk8:latest' ). inside(' -v $HOME:/tmp/jenkins-home' ) {
141
+ sh ' MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pci,artifactory ' +
142
+ ' -Dartifactory.server=https://repo.spring.io ' +
143
+ " -Dartifactory.username=${ ARTIFACTORY_USR} " +
144
+ " -Dartifactory.password=${ ARTIFACTORY_PSW} " +
145
+ " -Dartifactory.staging-repository=libs-snapshot-local " +
146
+ " -Dartifactory.build-name=spring-data-redis " +
147
+ " -Dartifactory.build-number=${ BUILD_NUMBER} " +
148
+ ' -Dmaven.test.skip=true clean deploy -U -B'
149
+ }
150
+ }
151
+ }
165
152
}
166
153
}
167
154
@@ -170,11 +157,7 @@ pipeline {
170
157
branch ' 2.4.x'
171
158
}
172
159
agent {
173
- docker {
174
- image ' adoptopenjdk/openjdk8:latest'
175
- label ' data'
176
- args ' -v $HOME/.m2:/tmp/jenkins-home/.m2'
177
- }
160
+ label ' data'
178
161
}
179
162
options { timeout(time : 20 , unit : ' MINUTES' ) }
180
163
@@ -183,12 +166,18 @@ pipeline {
183
166
}
184
167
185
168
steps {
186
- sh ' MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pci,distribute ' +
187
- ' -Dartifactory.server=https://repo.spring.io ' +
188
- " -Dartifactory.username=${ ARTIFACTORY_USR} " +
189
- " -Dartifactory.password=${ ARTIFACTORY_PSW} " +
190
- " -Dartifactory.distribution-repository=temp-private-local " +
191
- ' -Dmaven.test.skip=true clean deploy -U -B'
169
+ script {
170
+ docker. withRegistry(' ' , ' hub.docker.com-springbuildmaster' ) {
171
+ docker. image(' adoptopenjdk/openjdk8:latest' ). inside(' -v $HOME:/tmp/jenkins-home' ) {
172
+ sh ' MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pci,distribute ' +
173
+ ' -Dartifactory.server=https://repo.spring.io ' +
174
+ " -Dartifactory.username=${ ARTIFACTORY_USR} " +
175
+ " -Dartifactory.password=${ ARTIFACTORY_PSW} " +
176
+ " -Dartifactory.distribution-repository=temp-private-local " +
177
+ ' -Dmaven.test.skip=true clean deploy -U -B'
178
+ }
179
+ }
180
+ }
192
181
}
193
182
}
194
183
}
0 commit comments