Browse Source

DATAJDBC-628 - Enable Maven caching for Jenkins jobs.

Also, run all database integration tests for Java 8 baseline only.
pull/1035/head
Mark Paluch 5 years ago
parent
commit
f51aec2b7a
No known key found for this signature in database
GPG Key ID: 51A00FA751B91849
  1. 32
      Jenkinsfile

32
Jenkinsfile vendored

@ -23,8 +23,7 @@ pipeline { @@ -23,8 +23,7 @@ pipeline {
docker {
image 'adoptopenjdk/openjdk8:latest'
label 'data'
args '-u root -v /var/run/docker.sock:/var/run/docker.sock'
// root but with no maven caching
args '-u root -v /var/run/docker.sock:/var/run/docker.sock -v $HOME:/tmp/jenkins-home'
}
}
options { timeout(time: 30, unit: 'MINUTES') }
@ -32,8 +31,7 @@ pipeline { @@ -32,8 +31,7 @@ pipeline {
sh './accept-third-party-license.sh'
sh 'mkdir -p /tmp/jenkins-home'
sh 'chown -R 1001:1001 .'
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pci,all-dbs clean dependency:list test -Dsort -U -B'
sh 'chown -R 1001:1001 .'
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pci,all-dbs clean dependency:list test -Dsort -U -B -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-jdbc'
}
}
@ -50,17 +48,13 @@ pipeline { @@ -50,17 +48,13 @@ pipeline {
docker {
image 'adoptopenjdk/openjdk11:latest'
label 'data'
args '-u root -v /var/run/docker.sock:/var/run/docker.sock'
// root but with no maven caching
args '-u root -v /var/run/docker.sock:/var/run/docker.sock -v $HOME:/tmp/jenkins-home'
}
}
options { timeout(time: 30, unit: 'MINUTES') }
steps {
sh './accept-third-party-license.sh'
sh 'mkdir -p /tmp/jenkins-home'
sh 'chown -R 1001:1001 .'
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pci,all-dbs,java11 clean dependency:list test -Dsort -U -B'
sh 'chown -R 1001:1001 .'
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pci,java11 clean dependency:list test -Dsort -U -B -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-jdbc'
}
}
@ -69,17 +63,13 @@ pipeline { @@ -69,17 +63,13 @@ pipeline {
docker {
image 'adoptopenjdk/openjdk15:latest'
label 'data'
args '-u root -v /var/run/docker.sock:/var/run/docker.sock'
// root but with no maven caching
args '-u root -v /var/run/docker.sock:/var/run/docker.sock -v $HOME:/tmp/jenkins-home'
}
}
options { timeout(time: 30, unit: 'MINUTES') }
steps {
sh './accept-third-party-license.sh'
sh 'mkdir -p /tmp/jenkins-home'
sh 'chown -R 1001:1001 .'
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pci,all-dbs,java11 clean dependency:list test -Dsort -U -B'
sh 'chown -R 1001:1001 .'
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pci,java11 clean dependency:list test -Dsort -U -B -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-jdbc'
}
}
}
@ -96,7 +86,7 @@ pipeline { @@ -96,7 +86,7 @@ pipeline {
docker {
image 'adoptopenjdk/openjdk8:latest'
label 'data'
args '-v $HOME/.m2:/tmp/jenkins-home/.m2'
args '-u root -v /var/run/docker.sock:/var/run/docker.sock -v $HOME:/tmp/jenkins-home'
}
}
options { timeout(time: 20, unit: 'MINUTES') }
@ -106,8 +96,7 @@ pipeline { @@ -106,8 +96,7 @@ pipeline {
}
steps {
sh 'mkdir -p /tmp/jenkins-home'
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pci,artifactory ' +
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pci,artifactory -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-jdbc ' +
'-Dartifactory.server=https://repo.spring.io ' +
"-Dartifactory.username=${ARTIFACTORY_USR} " +
"-Dartifactory.password=${ARTIFACTORY_PSW} " +
@ -126,7 +115,7 @@ pipeline { @@ -126,7 +115,7 @@ pipeline {
docker {
image 'adoptopenjdk/openjdk8:latest'
label 'data'
args '-v $HOME/.m2:/tmp/jenkins-home/.m2'
args '-u root -v /var/run/docker.sock:/var/run/docker.sock -v $HOME:/tmp/jenkins-home'
}
}
options { timeout(time: 20, unit: 'MINUTES') }
@ -136,8 +125,7 @@ pipeline { @@ -136,8 +125,7 @@ pipeline {
}
steps {
sh 'mkdir -p /tmp/jenkins-home'
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pci,distribute ' +
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pci,distribute -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-jdbc ' +
'-Dartifactory.server=https://repo.spring.io ' +
"-Dartifactory.username=${ARTIFACTORY_USR} " +
"-Dartifactory.password=${ARTIFACTORY_PSW} " +

Loading…
Cancel
Save