Merge pull request #2469 from olamy/feature/build_local_repo_test

test new local repository for CI and use PMD cache
This commit is contained in:
Olivier Lamy 2018-04-20 18:54:10 +10:00 committed by GitHub
commit 5758fb52c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 17 deletions

33
Jenkinsfile vendored
View File

@ -17,6 +17,8 @@ def getFullBuild(jdk, os) {
// System Dependent Locations
def mvntool = tool name: 'maven3.5', type: 'hudson.tasks.Maven$MavenInstallation'
def jdktool = tool name: "$jdk", type: 'hudson.model.JDK'
def mvnName = 'maven3.5'
def localRepo = ".repository" // "${env.JENKINS_HOME}/${env.EXECUTOR_NUMBER}"
// Environment
List mvnEnv = ["PATH+MVN=${mvntool}/bin", "PATH+JDK=${jdktool}/bin", "JAVA_HOME=${jdktool}/", "MAVEN_HOME=${mvntool}"]
@ -38,11 +40,11 @@ def getFullBuild(jdk, os) {
withEnv(mvnEnv) {
timeout(time: 15, unit: 'MINUTES') {
withMaven(
maven: 'maven3',
maven: mvnName,
jdk: "$jdk",
publisherStrategy: 'EXPLICIT',
globalMavenSettingsConfig: 'oss-settings.xml',
mavenLocalRepo: "${env.JENKINS_HOME}/${env.EXECUTOR_NUMBER}") {
mavenLocalRepo: localRepo) {
sh "mvn -V -B clean install -DskipTests -T6"
}
@ -60,11 +62,11 @@ def getFullBuild(jdk, os) {
withEnv(mvnEnv) {
timeout(time: 20, unit: 'MINUTES') {
withMaven(
maven: 'maven3.5',
maven: mvnName,
jdk: "$jdk",
publisherStrategy: 'EXPLICIT',
globalMavenSettingsConfig: 'oss-settings.xml',
mavenLocalRepo: "${env.JENKINS_HOME}/${env.EXECUTOR_NUMBER}") {
mavenLocalRepo: localRepo) {
sh "mvn -V -B javadoc:javadoc -T5"
}
}
@ -82,12 +84,12 @@ def getFullBuild(jdk, os) {
timeout(time: 90, unit: 'MINUTES') {
// Run test phase / ignore test failures
withMaven(
maven: 'maven3.5',
maven: mvnName,
jdk: "$jdk",
publisherStrategy: 'EXPLICIT',
//options: [invokerPublisher(disabled: false)],
globalMavenSettingsConfig: 'oss-settings.xml',
mavenLocalRepo: "${env.JENKINS_HOME}/${env.EXECUTOR_NUMBER}") {
mavenLocalRepo: localRepo) {
//
sh "mvn -V -B install -Dmaven.test.failure.ignore=true -Prun-its -T3 -e -Dmaven.repo.local=${env.JENKINS_HOME}/${env.EXECUTOR_NUMBER} -Pmongodb"
}
@ -134,17 +136,14 @@ def getFullBuild(jdk, os) {
try
{
stage ("Compact3 - ${jdk}") {
dir("aggregates/jetty-all-compact3") {
withEnv(mvnEnv) {
withMaven(
maven: 'maven3.5',
jdk: "$jdk",
publisherStrategy: 'EXPLICIT',
globalMavenSettingsConfig: 'oss-settings.xml',
mavenLocalRepo: "${env.JENKINS_HOME}/${env.EXECUTOR_NUMBER}") {
sh "mvn -V -B -Pcompact3 clean install -T5"
}
withEnv(mvnEnv) {
withMaven(
maven: mvnName,
jdk: "$jdk",
publisherStrategy: 'EXPLICIT',
globalMavenSettingsConfig: 'oss-settings.xml',
mavenLocalRepo: localRepo) {
sh "mvn -f aggregates/jetty-all-compact3 -V -B -Pcompact3 clean install -T5"
}
}
}

View File

@ -231,6 +231,7 @@
<rulesets>
<ruleset>jetty/pmd_logging_ruleset.xml</ruleset>
</rulesets>
<analysisCache>true</analysisCache>
</configuration>
<dependencies>
<dependency>