diff --git a/Jenkinsfile b/Jenkinsfile index 3eedf7a95..e6298bc2d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,10 +1,51 @@ +#!/usr/bin/env groovy + pipeline { agent any stages { stage('Build') { steps { - sh 'echo "This is the development branch"' + sh './mvnw clean' + } + } + stage('Test') { + steps { + sh './mvnw test' + } + } + + stage('Package') { + steps { + sh './mvnw package' + } + } + stage('Deploy') { + when { + branch 'development' + } + steps { + echo "DEPLOY!" } } } -} + post { + always { + echo 'One way or another, I have finished' + } + success { + echo 'I succeeeded!' + mail to: 'daphne.augier@gmail.com', + subject: "Successful Pipeline: ${currentBuild.fullDisplayName}", + body: "Eveythink OK with ${env.BUILD_URL}\n" + } + unstable { + echo 'I am unstable :/' + } + failure { + echo 'I failed :(' + } + changed { + echo 'Things were different before...' + } + } +} \ No newline at end of file