Skip to content

Commit 5166950

Browse files
committed
Add Java 17 to CI pipeline.
Closes #2175
1 parent b1c4fc2 commit 5166950

File tree

3 files changed

+12
-86
lines changed

3 files changed

+12
-86
lines changed

Diff for: Jenkinsfile

+10-73
Original file line numberDiff line numberDiff line change
@@ -33,26 +33,7 @@ pipeline {
3333
}
3434
}
3535
}
36-
stage('Publish OpenJDK 11 + Redis 6.2 docker image') {
37-
when {
38-
anyOf {
39-
changeset "ci/openjdk11-redis-6.2/**"
40-
changeset "Makefile"
41-
}
42-
}
43-
agent { label 'data' }
44-
options { timeout(time: 20, unit: 'MINUTES') }
45-
46-
steps {
47-
script {
48-
def image = docker.build("springci/spring-data-openjdk11-with-redis-6.2", "-f ci/openjdk11-redis-6.2/Dockerfile .")
49-
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
50-
image.push()
51-
}
52-
}
53-
}
54-
}
55-
stage('Publish OpenJDK 16 + Redis 6.2 docker image') {
36+
stage('Publish OpenJDK 17 + Redis 6.2 docker image') {
5637
when {
5738
anyOf {
5839
changeset "ci/openjdk16-redis-6.2/**"
@@ -64,7 +45,7 @@ pipeline {
6445

6546
steps {
6647
script {
67-
def image = docker.build("springci/spring-data-openjdk16-with-redis-6.2", "-f ci/openjdk16-redis-6.2/Dockerfile .")
48+
def image = docker.build("springci/spring-data-openjdk17-with-redis-6.2", "-f ci/openjdk17-redis-6.2/Dockerfile .")
6849
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
6950
image.push()
7051
}
@@ -76,8 +57,9 @@ pipeline {
7657

7758
stage("test: baseline (jdk8)") {
7859
when {
60+
beforeAgent(true)
7961
anyOf {
80-
branch 'main'
62+
branch(pattern: "main|(\\d\\.\\d\\.x)", comparator: "REGEXP")
8163
not { triggeredBy 'UpstreamCause' }
8264
}
8365
}
@@ -101,13 +83,14 @@ pipeline {
10183

10284
stage("Test other configurations") {
10385
when {
86+
beforeAgent(true)
10487
allOf {
105-
branch 'main'
88+
branch(pattern: "main|(\\d\\.\\d\\.x)", comparator: "REGEXP")
10689
not { triggeredBy 'UpstreamCause' }
10790
}
10891
}
10992
parallel {
110-
stage("test: baseline (jdk11)") {
93+
stage("test: baseline (jdk17)") {
11194
agent {
11295
label 'data'
11396
}
@@ -118,25 +101,7 @@ pipeline {
118101
steps {
119102
script {
120103
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
121-
docker.image('springci/spring-data-openjdk11-with-redis-6.2:latest').inside('-v $HOME:/tmp/jenkins-home') {
122-
sh 'PROFILE=java11 ci/test.sh'
123-
}
124-
}
125-
}
126-
}
127-
}
128-
stage("test: baseline (jdk16)") {
129-
agent {
130-
label 'data'
131-
}
132-
options { timeout(time: 30, unit: 'MINUTES') }
133-
environment {
134-
ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c')
135-
}
136-
steps {
137-
script {
138-
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
139-
docker.image('springci/spring-data-openjdk16-with-redis-6.2:latest').inside('-v $HOME:/tmp/jenkins-home') {
104+
docker.image('springci/spring-data-openjdk17-with-redis-6.2:latest').inside('-v $HOME:/tmp/jenkins-home') {
140105
sh 'PROFILE=java11 ci/test.sh'
141106
}
142107
}
@@ -148,8 +113,9 @@ pipeline {
148113

149114
stage('Release to artifactory') {
150115
when {
116+
beforeAgent(true)
151117
anyOf {
152-
branch 'main'
118+
branch(pattern: "main|(\\d\\.\\d\\.x)", comparator: "REGEXP")
153119
not { triggeredBy 'UpstreamCause' }
154120
}
155121
}
@@ -179,35 +145,6 @@ pipeline {
179145
}
180146
}
181147
}
182-
183-
stage('Publish documentation') {
184-
when {
185-
branch 'main'
186-
}
187-
agent {
188-
label 'data'
189-
}
190-
options { timeout(time: 20, unit: 'MINUTES') }
191-
192-
environment {
193-
ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c')
194-
}
195-
196-
steps {
197-
script {
198-
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
199-
docker.image('adoptopenjdk/openjdk8:latest').inside('-v $HOME:/tmp/jenkins-home') {
200-
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pci,distribute ' +
201-
'-Dartifactory.server=https://repo.spring.io ' +
202-
"-Dartifactory.username=${ARTIFACTORY_USR} " +
203-
"-Dartifactory.password=${ARTIFACTORY_PSW} " +
204-
"-Dartifactory.distribution-repository=temp-private-local " +
205-
'-Dmaven.test.skip=true clean deploy -U -B'
206-
}
207-
}
208-
}
209-
}
210-
}
211148
}
212149

213150
post {

Diff for: ci/openjdk16-redis-6.2/Dockerfile

-12
This file was deleted.

Diff for: ci/openjdk11-redis-6.2/Dockerfile renamed to ci/openjdk17-redis-6.2/Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
FROM adoptopenjdk/openjdk11:latest
1+
FROM openjdk:17-bullseye
22

33
# Copy Spring Data Redis's Makefile into the container
44
COPY ./Makefile /
55

66
RUN set -eux; \
7+
sed -i -e 's/http/https/g' /etc/apt/sources.list ; \
78
apt-get update ; \
89
apt-get install -y build-essential ; \
910
make work/redis/bin/redis-cli work/redis/bin/redis-server REDIS_VERSION=6.2.4; \

0 commit comments

Comments
 (0)