You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by se...@apache.org on 2023/04/30 10:17:42 UTC
[comdev-events-site] branch main updated: Add mail notifications from comdev-site
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/comdev-events-site.git
The following commit(s) were added to refs/heads/main by this push:
new 0435c53 Add mail notifications from comdev-site
0435c53 is described below
commit 0435c537e887edfe259273a6c1973956400a9e7e
Author: Sebb <se...@apache.org>
AuthorDate: Sun Apr 30 11:17:32 2023 +0100
Add mail notifications from comdev-site
---
Jenkinsfile | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/Jenkinsfile b/Jenkinsfile
index 70a17ab..22523bc 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -172,5 +172,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: "dev@community.apache.org",
+ recipientProviders: [[$class: 'DevelopersRecipientProvider']],
+ from: "Jenkins <je...@ci-builds.apache.org>",
+ subject: "[website] 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: "dev@community.apache.org",
+ recipientProviders: [[$class: 'DevelopersRecipientProvider']],
+ from: 'Jenkins <je...@ci-builds.apache.org>',
+ subject: "[website] Jenkins job ${env.JOB_NAME}#${env.BUILD_NUMBER} back to normal",
+ body: """
+The build for ${env.JOB_NAME} completed successfully and is back to normal.
+
+Build: ${env.BUILD_URL}
+"""
+ )
+ }
+ }
+ }
}
}