Skip to content

Commit 2e5fae4

Browse files
committed
Test with Java 20 in CI.
See spring-projects#2536
1 parent 6316609 commit 2e5fae4

File tree

2 files changed

+72
-16
lines changed

2 files changed

+72
-16
lines changed

Jenkinsfile

+56-16
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ pipeline {
1818
}
1919

2020
stages {
21-
stage("Docker images") {
21+
stage("Docker Images") {
2222
parallel {
23-
stage('Publish JDK 17 + Redis 6.2 Docker image') {
23+
stage('Publish JDK 17 + Redis 6.2 Docker Image') {
2424
when {
2525
anyOf {
2626
changeset "ci/openjdk17-redis-6.2/Dockerfile"
@@ -40,6 +40,26 @@ pipeline {
4040
}
4141
}
4242
}
43+
stage('Publish JDK 20 + Redis 6.2 Docker Image') {
44+
when {
45+
anyOf {
46+
changeset "ci/openjdk20-redis-6.2/Dockerfile"
47+
changeset "Makefile"
48+
changeset "ci/pipeline.properties"
49+
}
50+
}
51+
agent { label 'data' }
52+
options { timeout(time: 20, unit: 'MINUTES') }
53+
54+
steps {
55+
script {
56+
def image = docker.build("springci/spring-data-with-redis-6.2:${p['java.next.tag']}", "--build-arg BASE=${p['docker.java.next.image']} --build-arg REDIS=${p['docker.redis.6.version']} -f ci/openjdk20-redis-6.2/Dockerfile .")
57+
docker.withRegistry(p['docker.registry'], p['docker.credentials']) {
58+
image.push()
59+
}
60+
}
61+
}
62+
}
4363
}
4464
}
4565

@@ -67,27 +87,47 @@ pipeline {
6787
}
6888
}
6989

70-
stage("test: native-hints") {
90+
stage("Test other configurations") {
7191
when {
7292
beforeAgent(true)
7393
anyOf {
7494
branch(pattern: "main|(\\d\\.\\d\\.x)", comparator: "REGEXP")
7595
not { triggeredBy 'UpstreamCause' }
7696
}
7797
}
78-
agent {
79-
label 'data'
80-
}
81-
options { timeout(time: 30, unit: 'MINUTES') }
82-
environment {
83-
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
84-
}
85-
steps {
86-
script {
87-
docker.image("harbor-repo.vmware.com/dockerhub-proxy-cache/springci/spring-data-with-redis-6.2:${p['java.main.tag']}").inside('-v $HOME:/tmp/jenkins-home') {
88-
sh 'PROFILE=runtimehints LONG_TESTS=false ci/test.sh'
89-
}
90-
}
98+
parallel {
99+
stage("test: native-hints") {
100+
agent {
101+
label 'data'
102+
}
103+
options { timeout(time: 30, unit: 'MINUTES') }
104+
environment {
105+
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
106+
}
107+
steps {
108+
script {
109+
docker.image("harbor-repo.vmware.com/dockerhub-proxy-cache/springci/spring-data-with-redis-6.2:${p['java.main.tag']}").inside('-v $HOME:/tmp/jenkins-home') {
110+
sh 'PROFILE=runtimehints LONG_TESTS=false ci/test.sh'
111+
}
112+
}
113+
}
114+
}
115+
stage("test: baseline (Java 20)") {
116+
agent {
117+
label 'data'
118+
}
119+
options { timeout(time: 30, unit: 'MINUTES') }
120+
environment {
121+
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
122+
}
123+
steps {
124+
script {
125+
docker.image("harbor-repo.vmware.com/dockerhub-proxy-cache/springci/spring-data-with-redis-6.2:${p['java.next.tag']}").inside('-v $HOME:/tmp/jenkins-home') {
126+
sh 'PROFILE=none LONG_TESTS=true ci/test.sh'
127+
}
128+
}
129+
}
130+
}
91131
}
92132
}
93133

ci/openjdk20-redis-6.2/Dockerfile

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
ARG BASE
2+
FROM ${BASE}
3+
# Any ARG statements before FROM are cleared.
4+
ARG REDIS
5+
6+
# Copy Spring Data Redis's Makefile into the container
7+
COPY ./Makefile /
8+
9+
RUN set -eux; \
10+
# sed -i -e 's/http/https/g' /etc/apt/sources.list ; \
11+
apt-get update ; \
12+
apt-get install -y build-essential ; \
13+
make work/redis/bin/redis-cli work/redis/bin/redis-server REDIS_VERSION=${REDIS}; \
14+
chmod -R o+rw work; \
15+
apt-get clean; \
16+
rm -rf /var/lib/apt/lists/*;

0 commit comments

Comments
 (0)