@@ -14,8 +14,9 @@ pipeline {
14
14
stages {
15
15
stage(" test: baseline (jdk8)" ) {
16
16
when {
17
+ beforeAgent(true )
17
18
anyOf {
18
- branch ' main'
19
+ branch( pattern : " main|( \\ d \\ . \\ d \\ .x) " , comparator : " REGEXP " )
19
20
not { triggeredBy ' UpstreamCause' }
20
21
}
21
22
}
@@ -42,8 +43,9 @@ pipeline {
42
43
43
44
stage(" Test other configurations" ) {
44
45
when {
46
+ beforeAgent(true )
45
47
allOf {
46
- branch ' main'
48
+ branch( pattern : " main|( \\ d \\ . \\ d \\ .x) " , comparator : " REGEXP " )
47
49
not { triggeredBy ' UpstreamCause' }
48
50
}
49
51
}
@@ -90,8 +92,9 @@ pipeline {
90
92
91
93
stage(' Release to artifactory' ) {
92
94
when {
95
+ beforeAgent(true )
93
96
anyOf {
94
- branch ' main'
97
+ branch( pattern : " main|( \\ d \\ . \\ d \\ .x) " , comparator : " REGEXP " )
95
98
not { triggeredBy ' UpstreamCause' }
96
99
}
97
100
}
@@ -121,34 +124,6 @@ pipeline {
121
124
}
122
125
}
123
126
}
124
- stage(' Publish documentation' ) {
125
- when {
126
- branch ' main'
127
- }
128
- agent {
129
- label ' data'
130
- }
131
- options { timeout(time : 20 , unit : ' MINUTES' ) }
132
-
133
- environment {
134
- ARTIFACTORY = credentials(' 02bd1690-b54f-4c9f-819d-a77cb7a9822c' )
135
- }
136
-
137
- steps {
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 -s settings.xml -Pci,distribute ' +
142
- ' -Dartifactory.server=https://repo.spring.io ' +
143
- " -Dartifactory.username=${ ARTIFACTORY_USR} " +
144
- " -Dartifactory.password=${ ARTIFACTORY_PSW} " +
145
- " -Dartifactory.distribution-repository=temp-private-local " +
146
- ' -Dmaven.test.skip=true clean deploy -U -B'
147
- }
148
- }
149
- }
150
- }
151
- }
152
127
}
153
128
154
129
post {
0 commit comments