@@ -83,8 +83,9 @@ pipeline {
83
83
84
84
stage(" test: baseline (jdk8)" ) {
85
85
when {
86
+ beforeAgent(true )
86
87
anyOf {
87
- branch ' main'
88
+ branch( pattern : " main|( \\ d \\ . \\ d \\ .x) " , comparator : " REGEXP " )
88
89
not { triggeredBy ' UpstreamCause' }
89
90
}
90
91
}
@@ -113,8 +114,9 @@ pipeline {
113
114
114
115
stage(" Test other configurations" ) {
115
116
when {
117
+ beforeAgent(true )
116
118
allOf {
117
- branch ' main'
119
+ branch( pattern : " main|( \\ d \\ . \\ d \\ .x) " , comparator : " REGEXP " )
118
120
not { triggeredBy ' UpstreamCause' }
119
121
}
120
122
}
@@ -219,8 +221,9 @@ pipeline {
219
221
220
222
stage(' Release to artifactory' ) {
221
223
when {
224
+ beforeAgent(true )
222
225
anyOf {
223
- branch ' main'
226
+ branch( pattern : " main|( \\ d \\ . \\ d \\ .x) " , comparator : " REGEXP " )
224
227
not { triggeredBy ' UpstreamCause' }
225
228
}
226
229
}
@@ -250,35 +253,6 @@ pipeline {
250
253
}
251
254
}
252
255
}
253
-
254
- stage(' Publish documentation' ) {
255
- when {
256
- branch ' main'
257
- }
258
- agent {
259
- label ' data'
260
- }
261
- options { timeout(time : 20 , unit : ' MINUTES' ) }
262
-
263
- environment {
264
- ARTIFACTORY = credentials(' 02bd1690-b54f-4c9f-819d-a77cb7a9822c' )
265
- }
266
-
267
- steps {
268
- script {
269
- docker. withRegistry(' ' , ' hub.docker.com-springbuildmaster' ) {
270
- docker. image(' adoptopenjdk/openjdk8:latest' ). inside(' -v $HOME:/tmp/jenkins-home' ) {
271
- sh ' MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pci,distribute ' +
272
- ' -Dartifactory.server=https://repo.spring.io ' +
273
- " -Dartifactory.username=${ ARTIFACTORY_USR} " +
274
- " -Dartifactory.password=${ ARTIFACTORY_PSW} " +
275
- " -Dartifactory.distribution-repository=temp-private-local " +
276
- ' -Dmaven.test.skip=true clean deploy -U -B'
277
- }
278
- }
279
- }
280
- }
281
- }
282
256
}
283
257
284
258
post {
0 commit comments