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 {
@@ -18,31 +18,7 @@ pipeline {
18
18
}
19
19
20
20
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)" ) {
46
22
when {
47
23
beforeAgent(true )
48
24
anyOf {
@@ -68,6 +44,36 @@ pipeline {
68
44
}
69
45
}
70
46
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
+
71
77
stage(' Release to artifactory' ) {
72
78
when {
73
79
beforeAgent(true )
0 commit comments