@@ -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 ' '
19
+ branch( pattern : " main|( \\ d \\ . \\ d \\ .x) " , comparator : " REGEXP " )
19
20
not { triggeredBy ' UpstreamCause' }
20
21
}
21
22
}
@@ -39,8 +40,9 @@ pipeline {
39
40
40
41
stage(" Test other configurations" ) {
41
42
when {
43
+ beforeAgent(true )
42
44
allOf {
43
- branch ' '
45
+ branch( pattern : " main|( \\ d \\ . \\ d \\ .x) " , comparator : " REGEXP " )
44
46
not { triggeredBy ' UpstreamCause' }
45
47
}
46
48
}
@@ -87,8 +89,9 @@ pipeline {
87
89
88
90
stage(' Release to artifactory' ) {
89
91
when {
92
+ beforeAgent(true )
90
93
anyOf {
91
- branch ' '
94
+ branch( pattern : " main|( \\ d \\ . \\ d \\ .x) " , comparator : " REGEXP " )
92
95
not { triggeredBy ' UpstreamCause' }
93
96
}
94
97
}
@@ -118,34 +121,6 @@ pipeline {
118
121
}
119
122
}
120
123
}
121
- stage(' Publish documentation' ) {
122
- when {
123
- branch ' '
124
- }
125
- agent {
126
- label ' data'
127
- }
128
- options { timeout(time : 20 , unit : ' MINUTES' ) }
129
-
130
- environment {
131
- ARTIFACTORY = credentials(' 02bd1690-b54f-4c9f-819d-a77cb7a9822c' )
132
- }
133
-
134
- steps {
135
- script {
136
- docker. withRegistry(' ' , ' hub.docker.com-springbuildmaster' ) {
137
- docker. image(' adoptopenjdk/openjdk8:latest' ). inside(' -v $HOME:/tmp/jenkins-home' ) {
138
- sh ' MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pci,distribute ' +
139
- ' -Dartifactory.server=https://repo.spring.io ' +
140
- " -Dartifactory.username=${ ARTIFACTORY_USR} " +
141
- " -Dartifactory.password=${ ARTIFACTORY_PSW} " +
142
- " -Dartifactory.distribution-repository=temp-private-local " +
143
- ' -Dmaven.test.skip=true clean deploy -U -B'
144
- }
145
- }
146
- }
147
- }
148
- }
149
124
}
150
125
151
126
post {
0 commit comments