25 lines
391 B
Groovy
25 lines
391 B
Groovy
#!groovy
|
|
|
|
// this groovy script is executed by jenkins
|
|
node {
|
|
|
|
// configure maven path for 3.3.9
|
|
def mvnHome = tool 'Maven 3.3.9'
|
|
|
|
// checkout code from scm
|
|
stage('Checkout') {
|
|
checkout scm
|
|
}
|
|
|
|
// delete target directories
|
|
stage('Clean') {
|
|
sh "${mvnHome}/bin/mvn -B clean"
|
|
}
|
|
|
|
// build the source code
|
|
stage('Build') {
|
|
sh "${mvnHome}/bin/mvn -B verify"
|
|
}
|
|
|
|
}
|