Skip to content

Commit b10eb75

Browse files
committed
Update Jenkinsfile according to Java 17 build pipeline configuration.
See #2122
1 parent a4952a9 commit b10eb75

File tree

1 file changed

+5
-89
lines changed

1 file changed

+5
-89
lines changed

Diff for: Jenkinsfile

+5-89
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/3.0.x", threshold: hudson.model.Result.SUCCESS)
12+
upstream(upstreamProjects: "spring-data-commons/main", threshold: hudson.model.Result.SUCCESS)
1313
}
1414

1515
options {
@@ -20,8 +20,9 @@ pipeline {
2020
stages {
2121
stage("test: baseline (Java 17)") {
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
}
@@ -48,68 +49,11 @@ pipeline {
4849
}
4950
}
5051

51-
stage("Test other configurations") {
52-
when {
53-
allOf {
54-
branch 'main'
55-
not { triggeredBy 'UpstreamCause' }
56-
}
57-
}
58-
parallel {
59-
stage("test: baseline (next)") {
60-
agent {
61-
label 'data'
62-
}
63-
options { timeout(time: 30, unit: 'MINUTES') }
64-
65-
environment {
66-
DOCKER_HUB = credentials("${p['docker.credentials']}")
67-
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
68-
}
69-
70-
steps {
71-
script {
72-
docker.withRegistry(p['docker.registry'], p['docker.credentials']) {
73-
docker.image(p['docker.java.next.image']).inside(p['docker.java.inside.docker']) {
74-
sh "docker login --username ${DOCKER_HUB_USR} --password ${DOCKER_HUB_PSW}"
75-
sh 'PROFILE=none ci/verify.sh'
76-
sh "ci/clean.sh"
77-
}
78-
}
79-
}
80-
}
81-
}
82-
83-
stage("test: baseline (LTS)") {
84-
agent {
85-
label 'data'
86-
}
87-
options { timeout(time: 30, unit: 'MINUTES') }
88-
89-
environment {
90-
DOCKER_HUB = credentials("${p['docker.credentials']}")
91-
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
92-
}
93-
94-
steps {
95-
script {
96-
docker.withRegistry(p['docker.registry'], p['docker.credentials']) {
97-
docker.image(p['docker.java.lts.image']).inside(p['docker.java.inside.docker']) {
98-
sh "docker login --username ${DOCKER_HUB_USR} --password ${DOCKER_HUB_PSW}"
99-
sh 'PROFILE=none ci/verify.sh'
100-
sh "ci/clean.sh"
101-
}
102-
}
103-
}
104-
}
105-
}
106-
}
107-
}
108-
10952
stage('Release to artifactory') {
11053
when {
54+
beforeAgent(true)
11155
anyOf {
112-
branch 'main'
56+
branch(pattern: "main|(\\d\\.\\d\\.x)", comparator: "REGEXP")
11357
not { triggeredBy 'UpstreamCause' }
11458
}
11559
}
@@ -139,34 +83,6 @@ pipeline {
13983
}
14084
}
14185
}
142-
stage('Publish documentation') {
143-
when {
144-
branch 'main'
145-
}
146-
agent {
147-
label 'data'
148-
}
149-
options { timeout(time: 20, unit: 'MINUTES') }
150-
151-
environment {
152-
ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c')
153-
}
154-
155-
steps {
156-
script {
157-
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
158-
docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.basic']) {
159-
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-elasticsearch-non-root ' +
160-
'-Dartifactory.server=https://repo.spring.io ' +
161-
"-Dartifactory.username=${ARTIFACTORY_USR} " +
162-
"-Dartifactory.password=${ARTIFACTORY_PSW} " +
163-
"-Dartifactory.distribution-repository=temp-private-local " +
164-
'-Dmaven.test.skip=true clean deploy -U -B'
165-
}
166-
}
167-
}
168-
}
169-
}
17086
}
17187

17288
post {

0 commit comments

Comments
 (0)