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: "dev@community.apache.org", + recipientProviders: [[$class: 'DevelopersRecipientProvider']], + from: "Jenkins <jenk...@ci-builds.apache.org>", + 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: "dev@community.apache.org", + recipientProviders: [[$class: 'DevelopersRecipientProvider']], + from: 'Jenkins <jenk...@ci-builds.apache.org>', + 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: dev-unsubscr...@community.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@community.apache.org For additional commands, e-mail: dev-h...@community.apache.org