Browse Source

DATAJDBC-442 - Run Docker on Jenkins with m2 home mount.

1.1.x
Mark Paluch 6 years ago
parent
commit
3c020550fa
No known key found for this signature in database
GPG Key ID: 51A00FA751B91849
  1. 12
      Jenkinsfile

12
Jenkinsfile vendored

@ -31,9 +31,10 @@ pipeline { @@ -31,9 +31,10 @@ pipeline {
}
options { timeout(time: 30, unit: 'MINUTES') }
steps {
sh 'rm -rf ?'
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 target"
sh 'chown -R 1001:1001 .'
}
}
}
@ -49,7 +50,7 @@ pipeline { @@ -49,7 +50,7 @@ pipeline {
docker {
image 'adoptopenjdk/openjdk8:latest'
label 'data'
args '-v $HOME:/tmp/jenkins-home'
args '-v $HOME/.m2:/tmp/jenkins-home/.m2'
}
}
options { timeout(time: 20, unit: 'MINUTES') }
@ -59,7 +60,7 @@ pipeline { @@ -59,7 +60,7 @@ pipeline {
}
steps {
sh 'rm -rf ?'
sh 'mkdir -p /tmp/jenkins-home'
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pci,artifactory ' +
'-Dartifactory.server=https://repo.spring.io ' +
"-Dartifactory.username=${ARTIFACTORY_USR} " +
@ -78,7 +79,7 @@ pipeline { @@ -78,7 +79,7 @@ pipeline {
docker {
image 'adoptopenjdk/openjdk8:latest'
label 'data'
args '-v $HOME:/tmp/jenkins-home'
args '-v $HOME/.m2:/tmp/jenkins-home/.m2'
}
}
options { timeout(time: 20, unit: 'MINUTES') }
@ -88,6 +89,7 @@ pipeline { @@ -88,6 +89,7 @@ pipeline {
}
steps {
sh 'mkdir -p /tmp/jenkins-home'
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pci,distribute ' +
'-Dartifactory.server=https://repo.spring.io ' +
"-Dartifactory.username=${ARTIFACTORY_USR} " +

Loading…
Cancel
Save