Added maven_jenkins

This commit is contained in:
Guillem Hernandez Sola
2020-10-19 21:09:35 +02:00
parent fcd03066fa
commit f6b14f475d

15
Jenkinsfile vendored
View File

@@ -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'
} }
} }
} }
} }
}