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

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


The following commit(s) were added to refs/heads/master by this push:
     new 8a88c45a2d [MNG-7863] don't email on s390 failures. The regular 
results are enough. (#1218)
8a88c45a2d is described below

commit 8a88c45a2d799268f8ce9ac012e08c8773a301a1
Author: Elliotte Rusty Harold <[email protected]>
AuthorDate: Wed Aug 23 09:05:21 2023 -0400

    [MNG-7863] don't email on s390 failures. The regular results are enough. 
(#1218)
---
 Jenkinsfile.s390x | 75 -------------------------------------------------------
 1 file changed, 75 deletions(-)

diff --git a/Jenkinsfile.s390x b/Jenkinsfile.s390x
index 84a00a8023..48995a8191 100644
--- a/Jenkinsfile.s390x
+++ b/Jenkinsfile.s390x
@@ -151,11 +151,6 @@ parallel(runITsTasks)
     echo "[FAILURE-001] ${e}"
     currentBuild.result = "FAILURE"
     throw e
-} finally {
-    // notify completion
-    stage("Notifications") {
-        notify_s390x()
-    }
 }
 
 def archiveDirs(stageId, archives) {
@@ -166,73 +161,3 @@ def archiveDirs(stageId, archives) {
     }
 }
 
-def notify_s390x() {
-    echo "Build result: ${currentBuild.currentResult}"
-    // determine the message details
-    def providers
-    def messageBody
-    def messageTail = ''
-    def messageSubject
-    def sendMail
-    switch(currentBuild.currentResult) {
-        case "SUCCESS":
-            providers = []
-            messageSubject = "Build succeeded in Jenkins: 
${currentBuild.fullDisplayName}"
-            messageBody = """See ${currentBuild.absoluteUrl}"""
-            // only send successfuly builds if the previous build was 
unsuccessful or incomplete
-            sendMail = currentBuild.previousBuild == null || 
!"SUCCESS".equals(currentBuild.previousBuild.result)
-        break
-        case "UNSTABLE":
-            providers = [[$class: 'CulpritsRecipientProvider']]
-            messageSubject = "Build unstable in Jenkins: 
${currentBuild.fullDisplayName}"
-            messageBody = """See ${currentBuild.absoluteUrl}"""
-            sendMail = true
-            messageTail = '\nBuild log:\n${BUILD_LOG}'
-        break
-        case "FAILURE":
-            providers = [[$class: 'CulpritsRecipientProvider']]
-            messageSubject = "Build failed in Jenkins: 
${currentBuild.fullDisplayName}"
-            messageBody = """See ${currentBuild.absoluteUrl}"""
-            sendMail = true
-            messageTail = '\nBuild log:\n${BUILD_LOG}'
-        break
-        case "ABORTED":
-            providers = [[$class: 'CulpritsRecipientProvider']]
-            messageSubject = "Build aborted in Jenkins: 
${currentBuild.fullDisplayName}"
-            messageBody = """See ${currentBuild.absoluteUrl}"""
-            sendMail = true
-            messageTail = '\nBuild log:\n${BUILD_LOG}'
-        break
-        default:
-            echo "Unknown status: ${currentBuild.currentResult}"
-        // should never happen if we are actually being invoked.
-        return
-    }
-
-    // add the changes to the email
-       def authors = []
-    if (currentBuild.changeSets.isEmpty() ) {
-        messageBody = messageBody + "\n\nNo changes.\n";
-    } else {
-        messageBody = messageBody + "\n\nChanges:\n";
-        for (def changeSet in currentBuild.changeSets) {
-            for (def change in changeSet) {
-                messageBody = messageBody + "\n* 
${change.msg.trim().replaceAll('\n','\n  ')}"
-                authors += change.author.id
-            }
-        }
-        messageBody = messageBody + "\n"
-    }
-    println("The authors of changes ${authors.unique()}.")
-    for (def author in authors) {
-               if (author.matches('(.*)github(.*)')) sendMail = false
-    }
-    
-    if (authors.isEmpty()) sendMail = false
-    
-    if (sendMail) {
-        messageBody = messageBody + '\n${FAILED_TESTS}\n' + messageTail
-        println("Sending email ...")
-        emailext body: messageBody, replyTo: '[email protected]', subject: 
messageSubject, to: '[email protected]'
-    }
-}

Reply via email to