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 <[email protected]> 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 <[email protected]> --- 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: "[email protected]", + 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: "[email protected]", + recipientProviders: [[$class: 'DevelopersRecipientProvider']] + ) + } + } } always { --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
