You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by ie...@apache.org on 2020/07/06 14:36:12 UTC

[james-project] 31/36: JAMES-3225 #comment Enabled build scans and added email notifications on build

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

ieugen pushed a commit to branch JAMES-3260-gradle-poc
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit de1e69bd674bb7469899aafde786dc3bd74b3045
Author: Eugen Stan <ie...@apache.org>
AuthorDate: Thu Jul 2 13:14:08 2020 +0300

    JAMES-3225 #comment Enabled build scans and added email notifications on build
    
    Signed-off-by: Eugen Stan <ie...@apache.org>
---
 Jenkinsfile | 29 +++++++++++++++++++++++++++--
 1 file changed, 27 insertions(+), 2 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 2fca524..4a139ab 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -50,14 +50,13 @@ pipeline {
     stages {
         stage('Build') {
             steps {
-                sh "./gradlew clean :apache-mailet:apache-mailet-standard:test --debug --stacktrace --scan"
                 sh "./gradlew clean build -x test"
             }
         }
 
         stage('Run tests') {
             steps {
-                sh "./gradlew build test"
+                sh "./gradlew build test --scan"
             }
         }
     }
@@ -67,6 +66,18 @@ pipeline {
         // If this build failed, send an email to the list.
         failure {
             echo "Failed "
+            script {
+                emailext(
+                        subject: "[BUILD-UNSTABLE]: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]'",
+                        body: """
+BUILD-UNSTABLE: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]':
+ 
+Check console output at "<a href="${env.BUILD_URL}">${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]</a>"
+""",
+                        to: "server-dev@james.apache.org",
+                        recipientProviders: [[$class: 'DevelopersRecipientProvider']]
+                )
+            }
         }
 
         // If this build didn't fail, but there were failing tests, send an email to the list.
@@ -77,6 +88,20 @@ pipeline {
         // Send an email, if the last build was not successful and this one is.
         success {
             echo "Success "
+            script {
+                if ((currentBuild.previousBuild != null) && (currentBuild.previousBuild.result != 'SUCCESS')) {
+                    emailext (
+                            subject: "[BUILD-STABLE]: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]'",
+                            body: """
+BUILD-STABLE: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]':
+ 
+Is back to normal.
+""",
+                            to: "server-dev@james.apache.org",
+                            recipientProviders: [[$class: 'DevelopersRecipientProvider']]
+                    )
+                }
+            }
         }
 
         always {


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