Skip to content

Commit f6f9d7e

Browse files
committed
Move baseline build to JDK17.
Closes #1057
1 parent f0bc1b1 commit f6f9d7e

File tree

1 file changed

+33
-63
lines changed

1 file changed

+33
-63
lines changed

Jenkinsfile

+33-63
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ pipeline {
33

44
triggers {
55
pollSCM 'H/10 * * * *'
6-
upstream(upstreamProjects: "spring-data-commons/main", threshold: hudson.model.Result.SUCCESS)
6+
upstream(upstreamProjects: "spring-data-commons/3.0.x", threshold: hudson.model.Result.SUCCESS)
77
}
88

99
options {
@@ -12,7 +12,7 @@ pipeline {
1212
}
1313

1414
stages {
15-
stage("test: baseline (jdk8)") {
15+
stage("test: baseline (jdk17)") {
1616
when {
1717
beforeAgent(true)
1818
anyOf {
@@ -33,7 +33,7 @@ pipeline {
3333
steps {
3434
script {
3535
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
36-
docker.image('adoptopenjdk/openjdk8:latest').inside('-u root -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker -v $HOME:/tmp/jenkins-home') {
36+
docker.image('openjdk:17-bullseye').inside('-u root -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker -v $HOME:/tmp/jenkins-home') {
3737
sh "docker login --username ${DOCKER_HUB_USR} --password ${DOCKER_HUB_PSW}"
3838
sh "PROFILE=ci,all-dbs ci/test.sh"
3939
sh "ci/clean.sh"
@@ -43,65 +43,6 @@ pipeline {
4343
}
4444
}
4545

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 (jdk11)") {
56-
agent {
57-
label 'data'
58-
}
59-
options { timeout(time: 30, unit: 'MINUTES') }
60-
61-
environment {
62-
DOCKER_HUB = credentials('hub.docker.com-springbuildmaster')
63-
ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c')
64-
}
65-
66-
steps {
67-
script {
68-
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
69-
docker.image('adoptopenjdk/openjdk11:latest').inside('-u root -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker -v $HOME:/tmp/jenkins-home') {
70-
sh "docker login --username ${DOCKER_HUB_USR} --password ${DOCKER_HUB_PSW}"
71-
sh "PROFILE=ci,java11 ci/test.sh"
72-
sh "ci/clean.sh"
73-
}
74-
}
75-
}
76-
}
77-
}
78-
79-
stage("test: baseline (jdk17)") {
80-
agent {
81-
label 'data'
82-
}
83-
options { timeout(time: 30, unit: 'MINUTES') }
84-
85-
environment {
86-
DOCKER_HUB = credentials('hub.docker.com-springbuildmaster')
87-
ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c')
88-
}
89-
90-
steps {
91-
script {
92-
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
93-
docker.image('openjdk:17-bullseye').inside('-u root -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker -v $HOME:/tmp/jenkins-home') {
94-
sh "docker login --username ${DOCKER_HUB_USR} --password ${DOCKER_HUB_PSW}"
95-
sh "PROFILE=ci,java11 ci/test.sh"
96-
sh "ci/clean.sh"
97-
}
98-
}
99-
}
100-
}
101-
}
102-
}
103-
}
104-
10546
stage('Release to artifactory') {
10647
when {
10748
beforeAgent(true)
@@ -122,7 +63,7 @@ pipeline {
12263
steps {
12364
script {
12465
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
125-
docker.image('adoptopenjdk/openjdk8:latest').inside('-v $HOME:/tmp/jenkins-home') {
66+
docker.image('openjdk:17-bullseye').inside('-v $HOME:/tmp/jenkins-home') {
12667
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-jdbc-non-root ' +
12768
'-Dartifactory.server=https://repo.spring.io ' +
12869
"-Dartifactory.username=${ARTIFACTORY_USR} " +
@@ -136,6 +77,35 @@ pipeline {
13677
}
13778
}
13879
}
80+
81+
stage('Publish documentation') {
82+
when {
83+
branch 'main'
84+
}
85+
agent {
86+
label 'data'
87+
}
88+
options { timeout(time: 20, unit: 'MINUTES') }
89+
90+
environment {
91+
ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c')
92+
}
93+
94+
steps {
95+
script {
96+
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
97+
docker.image('openjdk:17-bullseye').inside('-v $HOME:/tmp/jenkins-home') {
98+
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pci,distribute -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-jdbc-non-root ' +
99+
'-Dartifactory.server=https://repo.spring.io ' +
100+
"-Dartifactory.username=${ARTIFACTORY_USR} " +
101+
"-Dartifactory.password=${ARTIFACTORY_PSW} " +
102+
"-Dartifactory.distribution-repository=temp-private-local " +
103+
'-Dmaven.test.skip=true clean deploy -U -B'
104+
}
105+
}
106+
}
107+
}
108+
}
139109
}
140110

141111
post {

0 commit comments

Comments
 (0)