@@ -68,8 +68,9 @@ pipeline {
6868
6969 stage(" test: baseline (jdk8)" ) {
7070 when {
71+ beforeAgent(true )
7172 anyOf {
72- branch ' main'
73+ branch( pattern : " main|( \\ d \\ . \\ d \\ .x) " , comparator : " REGEXP " )
7374 not { triggeredBy ' UpstreamCause' }
7475 }
7576 }
@@ -98,8 +99,9 @@ pipeline {
9899
99100 stage(" Test other configurations" ) {
100101 when {
102+ beforeAgent(true )
101103 allOf {
102- branch ' main'
104+ branch( pattern : " main|( \\ d \\ . \\ d \\ .x) " , comparator : " REGEXP " )
103105 not { triggeredBy ' UpstreamCause' }
104106 }
105107 }
@@ -201,8 +203,9 @@ pipeline {
201203
202204 stage(' Release to artifactory' ) {
203205 when {
206+ beforeAgent(true )
204207 anyOf {
205- branch ' main'
208+ branch( pattern : " main|( \\ d \\ . \\ d \\ .x) " , comparator : " REGEXP " )
206209 not { triggeredBy ' UpstreamCause' }
207210 }
208211 }
@@ -232,34 +235,6 @@ pipeline {
232235 }
233236 }
234237 }
235- stage(' Publish documentation' ) {
236- when {
237- branch ' main'
238- }
239- agent {
240- label ' data'
241- }
242- options { timeout(time : 20 , unit : ' MINUTES' ) }
243-
244- environment {
245- ARTIFACTORY = credentials(' 02bd1690-b54f-4c9f-819d-a77cb7a9822c' )
246- }
247-
248- steps {
249- script {
250- docker. withRegistry(' ' , ' hub.docker.com-springbuildmaster' ) {
251- docker. image(' adoptopenjdk/openjdk8:latest' ). inside(' -v $HOME:/tmp/jenkins-home' ) {
252- sh ' MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pci,distribute ' +
253- ' -Dartifactory.server=https://repo.spring.io ' +
254- " -Dartifactory.username=${ ARTIFACTORY_USR} " +
255- " -Dartifactory.password=${ ARTIFACTORY_PSW} " +
256- " -Dartifactory.distribution-repository=temp-private-local " +
257- ' -Dmaven.test.skip=true clean deploy -U -B'
258- }
259- }
260- }
261- }
262- }
263238 }
264239
265240 post {
0 commit comments