You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@community.apache.org by "rlenferink (via GitHub)" <gi...@apache.org> on 2023/04/28 12:55:59 UTC

[GitHub] [comdev-site] rlenferink opened a new pull request, #109: Add a failure and fixed section to the Jenkinsfile for sending notifications

rlenferink opened a new pull request, #109:
URL: https://github.com/apache/comdev-site/pull/109

   I think it is useful to ping the dev@ list if a deployment of our main branch failed. Build failures might go unnoticed otherwise.
   
   I couldn't use the `when { branch 'main' }` since that apparently doesn't work in the `post` section: https://stackoverflow.com/a/49812779


-- 
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-unsubscribe@community.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@community.apache.org
For additional commands, e-mail: dev-help@community.apache.org


[GitHub] [comdev-site] bdelacretaz commented on a diff in pull request #109: Add a failure and fixed section to the Jenkinsfile for sending notifications

Posted by "bdelacretaz (via GitHub)" <gi...@apache.org>.
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 <je...@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 <je...@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-unsubscribe@community.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@community.apache.org
For additional commands, e-mail: dev-help@community.apache.org


[GitHub] [comdev-site] rlenferink merged pull request #109: Add a failure and fixed section to the Jenkinsfile for sending notifications

Posted by "rlenferink (via GitHub)" <gi...@apache.org>.
rlenferink merged PR #109:
URL: https://github.com/apache/comdev-site/pull/109


-- 
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-unsubscribe@community.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@community.apache.org
For additional commands, e-mail: dev-help@community.apache.org


[GitHub] [comdev-site] bdelacretaz commented on a diff in pull request #109: Add a failure and fixed section to the Jenkinsfile for sending notifications

Posted by "bdelacretaz (via GitHub)" <gi...@apache.org>.
bdelacretaz commented on code in PR #109:
URL: https://github.com/apache/comdev-site/pull/109#discussion_r1180385710


##########
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 <je...@ci-builds.apache.org>",
+                        subject: "Jenkins job ${env.JOB_NAME}#${env.BUILD_NUMBER} failed",

Review Comment:
   Could we add a [website] tag in the subject line? I'm a fan of tags these days ;-)



-- 
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-unsubscribe@community.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@community.apache.org
For additional commands, e-mail: dev-help@community.apache.org


[GitHub] [comdev-site] rlenferink commented on a diff in pull request #109: Add a failure and fixed section to the Jenkinsfile for sending notifications

Posted by "rlenferink (via GitHub)" <gi...@apache.org>.
rlenferink commented on code in PR #109:
URL: https://github.com/apache/comdev-site/pull/109#discussion_r1181025485


##########
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 <je...@ci-builds.apache.org>",
+                        subject: "Jenkins job ${env.JOB_NAME}#${env.BUILD_NUMBER} failed",

Review Comment:
   Good idea! Just added it.



-- 
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-unsubscribe@community.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@community.apache.org
For additional commands, e-mail: dev-help@community.apache.org