BLD FIX docker agent jenkins home volume
de.nclazz/maven-boot/pipeline/head There was a failure building this commit
Details
de.nclazz/maven-boot/pipeline/head There was a failure building this commit
Details
parent
2f4c2898af
commit
3b7a30722f
|
@ -0,0 +1,34 @@
|
||||||
|
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'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Build') {
|
||||||
|
steps {
|
||||||
|
sh 'mvn clean package'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('deploy') {
|
||||||
|
steps {
|
||||||
|
sh 'mvn help:effective-settings'
|
||||||
|
sh 'mvn deploy'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue