Skip to content

Commit bd3c540

Browse files
committed
Test with Java 20 in CI.
See #1367.
1 parent db7666d commit bd3c540

File tree

2 files changed

+33
-54
lines changed

2 files changed

+33
-54
lines changed

Jenkinsfile

+33-27
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
def p = [:]
22
node {
3-
checkout scm
4-
p = readProperties interpolate: true, file: 'ci/pipeline.properties'
3+
checkout scm
4+
p = readProperties interpolate: true, file: 'ci/pipeline.properties'
55
}
66

77
pipeline {
@@ -18,31 +18,7 @@ pipeline {
1818
}
1919

2020
stages {
21-
stage("Docker images") {
22-
parallel {
23-
stage('Publish JDK 17 + Cassandra 3.11') {
24-
when {
25-
anyOf {
26-
changeset "ci/openjdk17-8-cassandra-3.11/**"
27-
changeset "ci/pipeline.properties"
28-
}
29-
}
30-
agent { label 'data' }
31-
options { timeout(time: 30, unit: 'MINUTES') }
32-
33-
steps {
34-
script {
35-
def image = docker.build("springci/spring-data-with-cassandra-3.11:${p['java.main.tag']}", "--build-arg BASE=${p['docker.java.main.image']} --build-arg CASSANDRA=${p['docker.cassandra.3.version']} ci/openjdk17-8-cassandra-3.11/")
36-
docker.withRegistry(p['docker.registry'], p['docker.credentials']) {
37-
image.push()
38-
}
39-
}
40-
}
41-
}
42-
}
43-
}
44-
45-
stage("test: baseline (Java 17)") {
21+
stage("test: baseline (main)") {
4622
when {
4723
beforeAgent(true)
4824
anyOf {
@@ -68,6 +44,36 @@ pipeline {
6844
}
6945
}
7046

47+
stage("Test other configurations") {
48+
when {
49+
beforeAgent(true)
50+
allOf {
51+
branch(pattern: "main|(\\d\\.\\d\\.x)", comparator: "REGEXP")
52+
not { triggeredBy 'UpstreamCause' }
53+
}
54+
}
55+
parallel {
56+
stage("test: baseline (next)") {
57+
agent {
58+
label 'data'
59+
}
60+
options { timeout(time: 30, unit: 'MINUTES') }
61+
environment {
62+
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
63+
}
64+
steps {
65+
script {
66+
docker.image("harbor-repo.vmware.com/dockerhub-proxy-cache/springci/spring-data-with-cassandra-3.11:${p['java.next.tag']}").inside('-v $HOME:/tmp/jenkins-home') {
67+
sh 'mkdir -p /tmp/jenkins-home'
68+
sh 'JAVA_HOME=/opt/java/openjdk8 /opt/cassandra/bin/cassandra -R &'
69+
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pci,external-cassandra clean dependency:list verify -Dsort -U -B'
70+
}
71+
}
72+
}
73+
}
74+
}
75+
}
76+
7177
stage('Release to artifactory') {
7278
when {
7379
beforeAgent(true)

ci/openjdk17-8-cassandra-3.11/Dockerfile

-27
This file was deleted.

0 commit comments

Comments
 (0)