[ https://issues.apache.org/jira/browse/MNG-7848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17750579#comment-17750579 ]
ASF GitHub Bot commented on MNG-7848: ------------------------------------- olamy commented on code in PR #1213: URL: https://github.com/apache/maven/pull/1213#discussion_r1282671895 ########## Jenkinsfile.s390x: ########## @@ -171,3 +171,74 @@ 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: 'd...@maven.apache.org', subject: messageSubject, to: 'ri...@ca.ibm.com' Review Comment: can you change the `replyTo` ? > Add s390x pipeline to Jenkins CI > -------------------------------- > > Key: MNG-7848 > URL: https://issues.apache.org/jira/browse/MNG-7848 > Project: Maven > Issue Type: New Feature > Components: Bootstrap & Build, Integration Tests > Reporter: Kun Lu > Priority: Major > Labels: pull-request-available > > Apache INFRA team has installed necessary JDK flavours on all s390x nodes > (Please check issue > [https://issues.apache.org/jira/projects/INFRA/issues/INFRA-24781]). We’d > like to add the s390x pipeline to Jenkins CI by raising a PR to add ` > Jenkinsfile.s390x` to the Maven code base. > Can anyone from Maven team help us review the PR and create the s390x > pipeline on Jenkins? Thanks! -- This message was sent by Atlassian Jira (v8.20.10#820010)