Skip to content

Commit

Permalink
Test with Java 20 in CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
jxblum committed Apr 3, 2023
1 parent 6316609 commit 2e5fae4
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 16 deletions.
72 changes: 56 additions & 16 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ pipeline {
}

stages {
stage("Docker images") {
stage("Docker Images") {
parallel {
stage('Publish JDK 17 + Redis 6.2 Docker image') {
stage('Publish JDK 17 + Redis 6.2 Docker Image') {
when {
anyOf {
changeset "ci/openjdk17-redis-6.2/Dockerfile"
Expand All @@ -40,6 +40,26 @@ pipeline {
}
}
}
stage('Publish JDK 20 + Redis 6.2 Docker Image') {
when {
anyOf {
changeset "ci/openjdk20-redis-6.2/Dockerfile"
changeset "Makefile"
changeset "ci/pipeline.properties"
}
}
agent { label 'data' }
options { timeout(time: 20, unit: 'MINUTES') }

steps {
script {
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 .")
docker.withRegistry(p['docker.registry'], p['docker.credentials']) {
image.push()
}
}
}
}
}
}

Expand Down Expand Up @@ -67,27 +87,47 @@ pipeline {
}
}

stage("test: native-hints") {
stage("Test other configurations") {
when {
beforeAgent(true)
anyOf {
branch(pattern: "main|(\\d\\.\\d\\.x)", comparator: "REGEXP")
not { triggeredBy 'UpstreamCause' }
}
}
agent {
label 'data'
}
options { timeout(time: 30, unit: 'MINUTES') }
environment {
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
}
steps {
script {
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') {
sh 'PROFILE=runtimehints LONG_TESTS=false ci/test.sh'
}
}
parallel {
stage("test: native-hints") {
agent {
label 'data'
}
options { timeout(time: 30, unit: 'MINUTES') }
environment {
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
}
steps {
script {
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') {
sh 'PROFILE=runtimehints LONG_TESTS=false ci/test.sh'
}
}
}
}
stage("test: baseline (Java 20)") {
agent {
label 'data'
}
options { timeout(time: 30, unit: 'MINUTES') }
environment {
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
}
steps {
script {
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') {
sh 'PROFILE=none LONG_TESTS=true ci/test.sh'
}
}
}
}
}
}

Expand Down
16 changes: 16 additions & 0 deletions ci/openjdk20-redis-6.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
ARG BASE
FROM ${BASE}
# Any ARG statements before FROM are cleared.
ARG REDIS

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

RUN set -eux; \
# sed -i -e 's/http/https/g' /etc/apt/sources.list ; \
apt-get update ; \
apt-get install -y build-essential ; \
make work/redis/bin/redis-cli work/redis/bin/redis-server REDIS_VERSION=${REDIS}; \
chmod -R o+rw work; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*;

0 comments on commit 2e5fae4

Please sign in to comment.