Skip to content

Commit a11340b

Browse files
committed
Polishing.
See #2423
1 parent 9fbf391 commit a11340b

File tree

1 file changed

+6
-31
lines changed

1 file changed

+6
-31
lines changed

Jenkinsfile

+6-31
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ pipeline {
1414
stages {
1515
stage("test: baseline (jdk8)") {
1616
when {
17+
beforeAgent(true)
1718
anyOf {
18-
branch ''
19+
branch(pattern: "main|(\\d\\.\\d\\.x)", comparator: "REGEXP")
1920
not { triggeredBy 'UpstreamCause' }
2021
}
2122
}
@@ -39,8 +40,9 @@ pipeline {
3940

4041
stage("Test other configurations") {
4142
when {
43+
beforeAgent(true)
4244
allOf {
43-
branch ''
45+
branch(pattern: "main|(\\d\\.\\d\\.x)", comparator: "REGEXP")
4446
not { triggeredBy 'UpstreamCause' }
4547
}
4648
}
@@ -87,8 +89,9 @@ pipeline {
8789

8890
stage('Release to artifactory') {
8991
when {
92+
beforeAgent(true)
9093
anyOf {
91-
branch ''
94+
branch(pattern: "main|(\\d\\.\\d\\.x)", comparator: "REGEXP")
9295
not { triggeredBy 'UpstreamCause' }
9396
}
9497
}
@@ -118,34 +121,6 @@ pipeline {
118121
}
119122
}
120123
}
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-
}
149124
}
150125

151126
post {

0 commit comments

Comments
 (0)