diff --git a/Jenkinsfile b/Jenkinsfile index df01d0737..fa920a438 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,23 +3,36 @@ pipeline { stages { stage('Build') { steps { - sh './mvnw package' + sh 'mvn clean' } } stage('Test') { steps { - sh './mvnw package' + sh 'mvn test' } } stage('Package') { steps { - sh './mvnw package' + sh 'mvn package' } - } + } stage('Deploy') { steps { - sh './mvnw package' + sh 'mvn deploy' } } } -} + post { + success { + mail to: 'firassawan@icloud.com', + subject: "Succeeded Pipeline: ${currentBuild.fullDisplayName}", + body: "Email Notification: The build has successfully completed ${env.BUILD_URL}" + } + failure { + mail to: 'firassawan@icloud.com', + subject: "Failed Pipeline: ${currentBuild.fullDisplayName}", + body: "Email Notification: The build has not completed successfully ${env.BUILD_URL}" + } + + } +} \ No newline at end of file