BLD FIX docker agent jenkins home volume
de.nclazz/maven-boot/pipeline/head This commit looks good Details

develop
Niclas Thobaben 2020-12-01 00:40:04 +01:00
parent c8101d059f
commit 2f4c2898af
1 changed files with 0 additions and 37 deletions

37
Jenkinsfile vendored
View File

@ -1,37 +0,0 @@
pipeline {
environment {
JAVA_TOOL_OPTIONS = "-Duser.home=/var/maven"
}
agent {
docker {
image 'maven:3-alpine'
args '-v /var/jenkins_home/.m2:/var/maven/.m2:z -u root -e MAVEN_CONFIG=/var/maven/.m2'
reuseNode true
}
}
stages {
stage('Check Container') {
steps {
sh 'mvn --version'
sh 'whoami'
sh 'cat /root/.m2/settings-docker.xml'
sh 'mvn help:effective-settings'
sh 'ls -l /var/maven/.m2'
}
}
stage('Build') {
steps {
sh 'mvn clean package'
}
}
stage('deploy') {
steps {
sh 'mvn help:effective-settings'
sh 'mvn deploy'
}
}
}
}