Skip to content

Commit 712992c

Browse files
committed
Add Java 17 to CI pipeline.
Closes #656
1 parent 3eb9dd7 commit 712992c

File tree

1 file changed

+9
-35
lines changed

1 file changed

+9
-35
lines changed

Jenkinsfile

+9-35
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 'main'
19+
branch(pattern: "main|(\\d\\.\\d\\.x)", comparator: "REGEXP")
1920
not { triggeredBy 'UpstreamCause' }
2021
}
2122
}
@@ -44,8 +45,9 @@ pipeline {
4445

4546
stage("Test other configurations") {
4647
when {
48+
beforeAgent(true)
4749
allOf {
48-
branch 'main'
50+
branch(pattern: "main|(\\d\\.\\d\\.x)", comparator: "REGEXP")
4951
not { triggeredBy 'UpstreamCause' }
5052
}
5153
}
@@ -64,7 +66,7 @@ pipeline {
6466
steps {
6567
script {
6668
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
67-
docker.image('adoptopenjdk/openjdk11:latest').inside('-u root -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker -v $HOME:/tmp/jenkins-home') {
69+
docker.image('adoptopenjdk/openjdk11:latest').inside('-u root -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker -v $HOME:/tmp/jenkins-home -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-r2dbc-non-root') {
6870
sh "docker login --username ${DOCKER_HUB_USR} --password ${DOCKER_HUB_PSW}"
6971
sh 'PROFILE=ci,java11 ci/test.sh'
7072
sh "ci/clean.sh"
@@ -74,7 +76,7 @@ pipeline {
7476
}
7577
}
7678

77-
stage("test: baseline (jdk16)") {
79+
stage("test: baseline (jdk17)") {
7880
agent {
7981
label 'data'
8082
}
@@ -88,7 +90,7 @@ pipeline {
8890
steps {
8991
script {
9092
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
91-
docker.image('adoptopenjdk/openjdk16:latest').inside('-u root -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker -v $HOME:/tmp/jenkins-home') {
93+
docker.image('openjdk:17-bullseye').inside('-u root -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker -v $HOME:/tmp/jenkins-home') {
9294
sh "docker login --username ${DOCKER_HUB_USR} --password ${DOCKER_HUB_PSW}"
9395
sh 'PROFILE=ci,java11 ci/test.sh'
9496
sh "ci/clean.sh"
@@ -102,8 +104,9 @@ pipeline {
102104

103105
stage('Release to artifactory') {
104106
when {
107+
beforeAgent(true)
105108
anyOf {
106-
branch 'main'
109+
branch(pattern: "main|(\\d\\.\\d\\.x)", comparator: "REGEXP")
107110
not { triggeredBy 'UpstreamCause' }
108111
}
109112
}
@@ -133,35 +136,6 @@ pipeline {
133136
}
134137
}
135138
}
136-
137-
stage('Publish documentation') {
138-
when {
139-
branch 'main'
140-
}
141-
agent {
142-
label 'data'
143-
}
144-
options { timeout(time: 20, unit: 'MINUTES') }
145-
146-
environment {
147-
ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c')
148-
}
149-
150-
steps {
151-
script {
152-
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
153-
docker.image('adoptopenjdk/openjdk8:latest').inside('-v $HOME:/tmp/jenkins-home') {
154-
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-r2dbc-non-root ' +
155-
'-Dartifactory.server=https://repo.spring.io ' +
156-
"-Dartifactory.username=${ARTIFACTORY_USR} " +
157-
"-Dartifactory.password=${ARTIFACTORY_PSW} " +
158-
"-Dartifactory.distribution-repository=temp-private-local " +
159-
'-Dmaven.test.skip=true clean deploy -U -B'
160-
}
161-
}
162-
}
163-
}
164-
}
165139
}
166140

167141
post {

0 commit comments

Comments
 (0)