diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..d43cead --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,49 @@ +pipeline { + + agent any + + tools { + Maven 'maven:3.9.9' + } + + stages { + + stage("build"){ + + steps { + echo 'building application' + sh 'maven clean install' + } + } + + stage("test"){ + steps { + echo 'testing application' + sh 'mvn test' + } + } + + stage("package"){ + steps { + echo 'packaging application' + sh 'mvn package' + } + + stage("deploy"){ + + steps{ + echo 'deploying application' + sh 'mvn deploy' + } + } + + post{ + failure{ + echo 'Building failed' + emailext body: 'Building failing', subject: 'feedback', to: 'matchumsandy@gmail.com' + } + } + + } + +}