BLD FIX docker agent jenkins home volume
de.nclazz/maven-boot/pipeline/head There was a failure building this commit Details

develop
Niclas Thobaben 2020-12-01 00:37:29 +01:00
parent d86cc8086f
commit eb7c75642d
1 changed files with 33 additions and 30 deletions

7
Jenkinsfile vendored
View File

@ -1,8 +1,11 @@
pipeline {
environment {
JAVA_TOOL_OPTIONS = "-Duser.home=/var/maven"
}
agent {
docker {
image 'maven:3-alpine'
args '-v /var/jenkins_home/.m2:/root/.m2:z -u root'
args '-v /var/jenkins_home/.m2:/var/maven/.m2 -e MAVEN_CONFIG=/var/maven/.m2'
reuseNode true
}
}
@ -14,7 +17,7 @@ pipeline {
sh 'whoami'
sh 'cat /root/.m2/settings-docker.xml'
sh 'mvn help:effective-settings'
sh 'ls -l /root/.m2'
sh 'ls -l /var/maven/.m2'
}
}