@@ -74,23 +74,25 @@ pipeline {
7474 }
7575 }
7676
77- stage(" test: baseline" ) {
77+ stage(" test: baseline (jdk8) " ) {
7878 when {
7979 anyOf {
8080 branch ' master'
8181 not { triggeredBy ' UpstreamCause' }
8282 }
8383 }
8484 agent {
85- docker {
86- image ' springci/spring-data-openjdk8-with-redis-6.0:latest'
87- label ' data'
88- args ' -v $HOME/.m2:/tmp/jenkins-home/.m2'
89- }
85+ label ' data'
9086 }
9187 options { timeout(time : 30 , unit : ' MINUTES' ) }
9288 steps {
93- sh ' PROFILE=none LONG_TESTS=true ci/test.sh'
89+ script {
90+ docker. withRegistry(' ' , ' hub.docker.com-springbuildmaster' ) {
91+ docker. image(' springci/spring-data-openjdk8-with-redis-6.0:latest' ). inside(' -v $HOME:/tmp/jenkins-home' ) {
92+ sh ' PROFILE=none LONG_TESTS=true ci/test.sh'
93+ }
94+ }
95+ }
9496 }
9597 }
9698
@@ -104,28 +106,32 @@ pipeline {
104106 parallel {
105107 stage(" test: baseline (jdk11)" ) {
106108 agent {
107- docker {
108- image ' springci/spring-data-openjdk11-with-redis-6.0:latest'
109- label ' data'
110- args ' -v $HOME/.m2:/tmp/jenkins-home/.m2'
111- }
109+ label ' data'
112110 }
113111 options { timeout(time : 30 , unit : ' MINUTES' ) }
114112 steps {
115- sh ' PROFILE=java11 ci/test.sh'
113+ script {
114+ docker. withRegistry(' ' , ' hub.docker.com-springbuildmaster' ) {
115+ docker. image(' springci/spring-data-openjdk11-with-redis-6.0:latest' ). inside(' -v $HOME:/tmp/jenkins-home' ) {
116+ sh ' PROFILE=java11 ci/test.sh'
117+ }
118+ }
119+ }
116120 }
117121 }
118122 stage(" test: baseline (jdk15)" ) {
119123 agent {
120- docker {
121- image ' springci/spring-data-openjdk15-with-redis-6.0:latest'
122- label ' data'
123- args ' -v $HOME/.m2:/tmp/jenkins-home/.m2'
124- }
124+ label ' data'
125125 }
126126 options { timeout(time : 30 , unit : ' MINUTES' ) }
127127 steps {
128- sh ' PROFILE=java11 ci/test.sh'
128+ script {
129+ docker. withRegistry(' ' , ' hub.docker.com-springbuildmaster' ) {
130+ docker. image(' springci/spring-data-openjdk15-with-redis-6.0:latest' ). inside(' -v $HOME:/tmp/jenkins-home' ) {
131+ sh ' PROFILE=java11 ci/test.sh'
132+ }
133+ }
134+ }
129135 }
130136 }
131137 }
@@ -139,11 +145,7 @@ pipeline {
139145 }
140146 }
141147 agent {
142- docker {
143- image ' adoptopenjdk/openjdk8:latest'
144- label ' data'
145- args ' -v $HOME/.m2:/tmp/jenkins-home/.m2'
146- }
148+ label ' data'
147149 }
148150 options { timeout(time : 20 , unit : ' MINUTES' ) }
149151
@@ -152,14 +154,20 @@ pipeline {
152154 }
153155
154156 steps {
155- sh ' MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pci,artifactory ' +
156- ' -Dartifactory.server=https://repo.spring.io ' +
157- " -Dartifactory.username=${ ARTIFACTORY_USR} " +
158- " -Dartifactory.password=${ ARTIFACTORY_PSW} " +
159- " -Dartifactory.staging-repository=libs-snapshot-local " +
160- " -Dartifactory.build-name=spring-data-redis " +
161- " -Dartifactory.build-number=${ BUILD_NUMBER} " +
162- ' -Dmaven.test.skip=true clean deploy -U -B'
157+ script {
158+ docker. withRegistry(' ' , ' hub.docker.com-springbuildmaster' ) {
159+ docker. image(' adoptopenjdk/openjdk8:latest' ). inside(' -v $HOME:/tmp/jenkins-home' ) {
160+ sh ' MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pci,artifactory ' +
161+ ' -Dartifactory.server=https://repo.spring.io ' +
162+ " -Dartifactory.username=${ ARTIFACTORY_USR} " +
163+ " -Dartifactory.password=${ ARTIFACTORY_PSW} " +
164+ " -Dartifactory.staging-repository=libs-snapshot-local " +
165+ " -Dartifactory.build-name=spring-data-redis " +
166+ " -Dartifactory.build-number=${ BUILD_NUMBER} " +
167+ ' -Dmaven.test.skip=true clean deploy -U -B'
168+ }
169+ }
170+ }
163171 }
164172 }
165173
@@ -168,11 +176,7 @@ pipeline {
168176 branch ' master'
169177 }
170178 agent {
171- docker {
172- image ' adoptopenjdk/openjdk8:latest'
173- label ' data'
174- args ' -v $HOME/.m2:/tmp/jenkins-home/.m2'
175- }
179+ label ' data'
176180 }
177181 options { timeout(time : 20 , unit : ' MINUTES' ) }
178182
@@ -181,12 +185,18 @@ pipeline {
181185 }
182186
183187 steps {
184- sh ' MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pci,distribute ' +
185- ' -Dartifactory.server=https://repo.spring.io ' +
186- " -Dartifactory.username=${ ARTIFACTORY_USR} " +
187- " -Dartifactory.password=${ ARTIFACTORY_PSW} " +
188- " -Dartifactory.distribution-repository=temp-private-local " +
189- ' -Dmaven.test.skip=true clean deploy -U -B'
188+ script {
189+ docker. withRegistry(' ' , ' hub.docker.com-springbuildmaster' ) {
190+ docker. image(' adoptopenjdk/openjdk8:latest' ). inside(' -v $HOME:/tmp/jenkins-home' ) {
191+ sh ' MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pci,distribute ' +
192+ ' -Dartifactory.server=https://repo.spring.io ' +
193+ " -Dartifactory.username=${ ARTIFACTORY_USR} " +
194+ " -Dartifactory.password=${ ARTIFACTORY_PSW} " +
195+ " -Dartifactory.distribution-repository=temp-private-local " +
196+ ' -Dmaven.test.skip=true clean deploy -U -B'
197+ }
198+ }
199+ }
190200 }
191201 }
192202 }
0 commit comments