Added maven_jenkins
This commit is contained in:
15
Jenkinsfile
vendored
15
Jenkinsfile
vendored
@@ -1,32 +1,27 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
|
|
||||||
|
tools {
|
||||||
|
// Install the Maven version configured as "M3" and add it to the path.
|
||||||
|
maven "maven_jenkins"
|
||||||
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage ('Compile Stage') {
|
stage ('Compile Stage') {
|
||||||
|
|
||||||
steps {
|
steps {
|
||||||
withMaven(maven : 'maven_jenkins') {
|
|
||||||
sh 'mvn clean compile'
|
sh 'mvn clean compile'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
stage ('Testing Stage') {
|
stage ('Testing Stage') {
|
||||||
|
|
||||||
steps {
|
steps {
|
||||||
withMaven(maven : 'maven_jenkins') {
|
|
||||||
sh 'mvn test'
|
sh 'mvn test'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
stage ('Deployment Stage') {
|
stage ('Deployment Stage') {
|
||||||
steps {
|
steps {
|
||||||
withMaven(maven : 'maven_jenkins') {
|
|
||||||
sh 'mvn deploy'
|
sh 'mvn deploy'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user