bdelacretaz commented on code in PR #109:
URL: https://github.com/apache/comdev-site/pull/109#discussion_r1180386183


##########
Jenkinsfile:
##########
@@ -168,5 +168,43 @@ pipeline {
             }
             deleteDir() /* clean up our workspace */
         }
+
+        // If the build failed, send an email to the list.
+        failure {
+            script {
+                if (env.BRANCH_NAME == 'main') {
+                    emailext(
+                        to: "[email protected]",
+                        recipientProviders: [[$class: 
'DevelopersRecipientProvider']],
+                        from: "Jenkins <[email protected]>",
+                        subject: "Jenkins job 
${env.JOB_NAME}#${env.BUILD_NUMBER} failed",
+                        body: """
+There is a build failure in ${env.JOB_NAME}.
+
+Build: ${env.BUILD_URL}
+"""
+                    )
+                }
+            }
+        }
+
+        // Send an email, if the last build was not successful and this one is.
+        fixed {
+            script {
+                if (env.BRANCH_NAME == 'main') {
+                    emailext(
+                        to: "[email protected]",
+                        recipientProviders: [[$class: 
'DevelopersRecipientProvider']],
+                        from: 'Jenkins <[email protected]>',
+                        subject: "Jenkins job 
${env.JOB_NAME}#${env.BUILD_NUMBER} back to normal",

Review Comment:
   Same comment about a [website] tag here



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to