Skip to content

Commit 41a1d09

Browse files
committed
Refine CI triggers.
See #2307
1 parent 390dfbc commit 41a1d09

File tree

1 file changed

+4
-30
lines changed

1 file changed

+4
-30
lines changed

Jenkinsfile

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

4344
stage('Release to artifactory') {
4445
when {
46+
beforeAgent(true)
4547
anyOf {
46-
branch 'main'
48+
branch(pattern: "main|(\\d\\.\\d\\.x)", comparator: "REGEXP")
4749
not { triggeredBy 'UpstreamCause' }
4850
}
4951
}
@@ -73,34 +75,6 @@ pipeline {
7375
}
7476
}
7577
}
76-
stage('Publish documentation') {
77-
when {
78-
branch 'main'
79-
}
80-
agent {
81-
label 'data'
82-
}
83-
options { timeout(time: 20, unit: 'MINUTES') }
84-
85-
environment {
86-
ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c')
87-
}
88-
89-
steps {
90-
script {
91-
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
92-
docker.image('openjdk:17-bullseye').inside('-v $HOME:/tmp/jenkins-home') {
93-
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pci,distribute ' +
94-
'-Dartifactory.server=https://repo.spring.io ' +
95-
"-Dartifactory.username=${ARTIFACTORY_USR} " +
96-
"-Dartifactory.password=${ARTIFACTORY_PSW} " +
97-
"-Dartifactory.distribution-repository=temp-private-local " +
98-
'-Dmaven.test.skip=true clean deploy -U -B'
99-
}
100-
}
101-
}
102-
}
103-
}
10478
}
10579

10680
post {

0 commit comments

Comments
 (0)