Skip to content

Commit 5499a75

Browse files
committed
Test against Java 20 on CI.
See #1703.
1 parent 14746c2 commit 5499a75

File tree

1 file changed

+43
-20
lines changed

1 file changed

+43
-20
lines changed

Jenkinsfile

Lines changed: 43 additions & 20 deletions
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,7 +18,7 @@ pipeline {
1818
}
1919

2020
stages {
21-
stage("test: baseline (Java 17)") {
21+
stage("test: baseline (main)") {
2222
when {
2323
beforeAgent(true)
2424
anyOf {
@@ -31,16 +31,41 @@ pipeline {
3131
}
3232
options { timeout(time: 30, unit: 'MINUTES') }
3333
environment {
34-
DOCKER_HUB = credentials("${p['docker.credentials']}")
3534
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
3635
}
3736
steps {
3837
script {
39-
docker.withRegistry(p['docker.registry'], p['docker.credentials']) {
40-
docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.docker']) {
41-
sh "docker login --username ${DOCKER_HUB_USR} --password ${DOCKER_HUB_PSW}"
42-
sh 'PROFILE=ci ci/test.sh'
43-
sh "ci/clean.sh"
38+
docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.docker']) {
39+
sh 'PROFILE=ci ci/test.sh'
40+
sh "ci/clean.sh"
41+
}
42+
}
43+
}
44+
}
45+
46+
stage("Test other configurations") {
47+
when {
48+
beforeAgent(true)
49+
allOf {
50+
branch(pattern: "main|(\\d\\.\\d\\.x)", comparator: "REGEXP")
51+
not { triggeredBy 'UpstreamCause' }
52+
}
53+
}
54+
parallel {
55+
stage("test: baseline (next)") {
56+
agent {
57+
label 'data'
58+
}
59+
options { timeout(time: 30, unit: 'MINUTES') }
60+
environment {
61+
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
62+
}
63+
steps {
64+
script {
65+
docker.image(p['docker.java.next.image']).inside(p['docker.java.inside.docker']) {
66+
sh 'PROFILE=ci ci/test.sh'
67+
sh "ci/clean.sh"
68+
}
4469
}
4570
}
4671
}
@@ -66,17 +91,15 @@ pipeline {
6691

6792
steps {
6893
script {
69-
docker.withRegistry(p['docker.registry'], p['docker.credentials']) {
70-
docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.basic']) {
71-
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pci,artifactory -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-couchbase-non-root ' +
72-
'-Dartifactory.server=https://repo.spring.io ' +
73-
"-Dartifactory.username=${ARTIFACTORY_USR} " +
74-
"-Dartifactory.password=${ARTIFACTORY_PSW} " +
75-
"-Dartifactory.staging-repository=libs-snapshot-local " +
76-
"-Dartifactory.build-name=spring-data-couchbase " +
77-
"-Dartifactory.build-number=${BUILD_NUMBER} " +
78-
'-Dmaven.test.skip=true clean deploy -U -B'
79-
}
94+
docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.basic']) {
95+
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pci,artifactory -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-couchbase-non-root ' +
96+
'-Dartifactory.server=https://repo.spring.io ' +
97+
"-Dartifactory.username=${ARTIFACTORY_USR} " +
98+
"-Dartifactory.password=${ARTIFACTORY_PSW} " +
99+
"-Dartifactory.staging-repository=libs-snapshot-local " +
100+
"-Dartifactory.build-name=spring-data-couchbase " +
101+
"-Dartifactory.build-number=${BUILD_NUMBER} " +
102+
'-Dmaven.test.skip=true clean deploy -U -B'
80103
}
81104
}
82105
}

0 commit comments

Comments
 (0)