This is an automated email from the ASF dual-hosted git repository.

keyur pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/usergrid.git

commit 7351577a3375d391cb973c9fcdf28196c5729a4b
Author: Keyur Karnik <[email protected]>
AuthorDate: Fri May 31 03:28:09 2019 -0700

    Add email notifications to Jenkins pipeline
---
 stack/Jenkinsfile | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/stack/Jenkinsfile b/stack/Jenkinsfile
index 023596e..05d8017 100644
--- a/stack/Jenkinsfile
+++ b/stack/Jenkinsfile
@@ -36,6 +36,12 @@ pipeline {
                     echo "PATH = ${PATH}"
                     echo "M2_HOME = ${M2_HOME}"
                 '''
+
+                emailext (
+                    subject: "STARTED : UG Build Job '${env.JOB_NAME} 
[${env.BUILD_NUMBER}]'",
+                    body: """UG Build Job '${env.JOB_NAME} 
[${env.BUILD_NUMBER}]' has been kicked off \nCheck output at 
'${env.BUILD_URL}'""",
+                    recipientProviders: [[$class: 
'RequesterRecipientProvider'], [$class: 'DevelopersRecipientProvider']]
+                )
             }
         }
 
@@ -75,6 +81,7 @@ pipeline {
                 '''
             }
         }
+
     }
 
     post {
@@ -87,9 +94,19 @@ pipeline {
         }
         success {
             echo 'Usergrid build and tests succeeded'
+            emailext (
+                    subject: "SUCCESS : UG Build Job '${env.JOB_NAME} 
[${env.BUILD_NUMBER}]'",
+                    body: """UG Build Job '${env.JOB_NAME} 
[${env.BUILD_NUMBER}]' has completed SUCCESSFULLY \nCheck output at 
'${env.BUILD_URL}'""",
+                    recipientProviders: [[$class: 
'RequesterRecipientProvider'], [$class: 'DevelopersRecipientProvider']]
+                )
         }
         failure {
             echo 'Usergrid build and/or tests failed'
+            emailext (
+                    subject: "FAILURE : UG Build Job '${env.JOB_NAME} 
[${env.BUILD_NUMBER}]'",
+                    body: """UG Build Job '${env.JOB_NAME} 
[${env.BUILD_NUMBER}]' has FAILED \nCheck output at '${env.BUILD_URL}'""",
+                    recipientProviders: [[$class: 
'CulpritsRecipientProvider'], [$class: 'RequesterRecipientProvider'], [$class: 
'DevelopersRecipientProvider']]
+                )
         }
 
     }

Reply via email to