Skip to content

Commit bd41a64

Browse files
committed
Update build triggers.
See #2508
1 parent 46d3e30 commit bd41a64

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

Jenkinsfile

+12-5
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pipeline {
99

1010
triggers {
1111
pollSCM 'H/10 * * * *'
12-
upstream(upstreamProjects: "spring-data-commons/main", threshold: hudson.model.Result.SUCCESS)
12+
upstream(upstreamProjects: "spring-data-commons/2.7.x", threshold: hudson.model.Result.SUCCESS)
1313
}
1414

1515
options {
@@ -20,8 +20,9 @@ pipeline {
2020
stages {
2121
stage("test: baseline (main)") {
2222
when {
23+
beforeAgent(true)
2324
anyOf {
24-
branch 'main'
25+
branch(pattern: "main|(\\d\\.\\d\\.x)", comparator: "REGEXP")
2526
not { triggeredBy 'UpstreamCause' }
2627
}
2728
}
@@ -50,8 +51,9 @@ pipeline {
5051

5152
stage("Test other configurations") {
5253
when {
54+
beforeAgent(true)
5355
allOf {
54-
branch 'main'
56+
branch(pattern: "main|(\\d\\.\\d\\.x)", comparator: "REGEXP")
5557
not { triggeredBy 'UpstreamCause' }
5658
}
5759
}
@@ -108,8 +110,9 @@ pipeline {
108110

109111
stage('Release to artifactory') {
110112
when {
113+
beforeAgent(true)
111114
anyOf {
112-
branch 'main'
115+
branch(pattern: "main|(\\d\\.\\d\\.x)", comparator: "REGEXP")
113116
not { triggeredBy 'UpstreamCause' }
114117
}
115118
}
@@ -142,7 +145,11 @@ pipeline {
142145

143146
stage('Publish documentation') {
144147
when {
145-
branch 'main'
148+
beforeAgent(true)
149+
anyOf {
150+
branch(pattern: "main|(\\d\\.\\d\\.x)", comparator: "REGEXP")
151+
not { triggeredBy 'UpstreamCause' }
152+
}
146153
}
147154
agent {
148155
label 'data'

0 commit comments

Comments
 (0)