From 1f0de2eaa074404262850c15ce6c5c8f93e6882a Mon Sep 17 00:00:00 2001 From: Manuele Simi Date: Mon, 21 Oct 2019 23:28:35 -0400 Subject: [PATCH] Adjust emails. Attach log in case of failures. --- Jenkinsfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a1234c0..395642f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -256,13 +256,15 @@ pipeline { } success { echo 'The pipeline worked!' - emailext attachmentsPattern: "${AGENT_ROOT_FOLDER}/build_commits.${PIPELINE_BUILD_NUMBER}.csv", to: 'jenkinsbuilds@d4science.org', + emailext attachmentsPattern: "${AGENT_ROOT_FOLDER}/build_commits.${PIPELINE_BUILD_NUMBER}.csv", + to: 'jenkinsbuilds@d4science.org', subject: "[Jenkins build D4S] build ${currentBuild.fullDisplayName} worked", body: "Build time: ${currentBuild.durationString}. See ${env.BUILD_URL}" } failure { echo 'The pipeline has failed' - mail to: 'jenkinsbuilds@d4science.org', + emailext attachLog: true, + to: 'jenkinsbuilds@d4science.org', subject: "[Jenkins build D4S] build ${currentBuild.fullDisplayName} failed", body: "Something is wrong with ${env.BUILD_URL}" }