1
1
def p = [:]
2
2
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'
5
5
}
6
6
7
7
pipeline {
@@ -22,7 +22,7 @@ pipeline {
22
22
parallel {
23
23
stage(' Publish JDK 17 + Cassandra 3.11' ) {
24
24
when {
25
- anyOf {
25
+ anyOf {
26
26
changeset " ci/openjdk17-8-cassandra-3.11/**"
27
27
changeset " ci/pipeline.properties"
28
28
}
@@ -39,10 +39,29 @@ pipeline {
39
39
}
40
40
}
41
41
}
42
+ stage(' Publish JDK 20 + Cassandra 3.11' ) {
43
+ when {
44
+ anyOf {
45
+ changeset " ci/openjdk20-8-cassandra-3.11/**"
46
+ changeset " ci/pipeline.properties"
47
+ }
48
+ }
49
+ agent { label ' data' }
50
+ options { timeout(time : 30 , unit : ' MINUTES' ) }
51
+
52
+ steps {
53
+ script {
54
+ def image = docker. build(" springci/spring-data-with-cassandra-3.11:${ p['java.next.tag']} " , " --build-arg BASE=${ p['docker.java.next.image']} --build-arg CASSANDRA=${ p['docker.cassandra.3.version']} ci/openjdk20-8-cassandra-3.11/" )
55
+ docker. withRegistry(p[' docker.registry' ], p[' docker.credentials' ]) {
56
+ image. push()
57
+ }
58
+ }
59
+ }
60
+ }
42
61
}
43
62
}
44
63
45
- stage(" test: baseline (Java 17 )" ) {
64
+ stage(" test: baseline (main )" ) {
46
65
when {
47
66
beforeAgent(true )
48
67
anyOf {
@@ -68,6 +87,36 @@ pipeline {
68
87
}
69
88
}
70
89
90
+ stage(" Test other configurations" ) {
91
+ when {
92
+ beforeAgent(true )
93
+ allOf {
94
+ branch(pattern : " main|(\\ d\\ .\\ d\\ .x)" , comparator : " REGEXP" )
95
+ not { triggeredBy ' UpstreamCause' }
96
+ }
97
+ }
98
+ parallel {
99
+ stage(" test: baseline (next)" ) {
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-cassandra-3.11:${ p['java.next.tag']} " ). inside(' -v $HOME:/tmp/jenkins-home' ) {
110
+ sh ' mkdir -p /tmp/jenkins-home'
111
+ sh ' JAVA_HOME=/opt/java/openjdk8 /opt/cassandra/bin/cassandra -R &'
112
+ 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'
113
+ }
114
+ }
115
+ }
116
+ }
117
+ }
118
+ }
119
+
71
120
stage(' Release to artifactory' ) {
72
121
when {
73
122
beforeAgent(true )
0 commit comments