Skip to content

Commit c22ad66

Browse files
committed
Refine CI triggers.
See #1054
1 parent 5af3fcc commit c22ad66

File tree

1 file changed

+4
-31
lines changed

1 file changed

+4
-31
lines changed

Jenkinsfile

+4-31
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
}
@@ -44,8 +45,9 @@ pipeline {
4445

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

10982
post {

0 commit comments

Comments
 (0)