Send report separately from build results to the releases mailing list.

This commit is contained in:
Manuele Simi 2019-10-22 15:05:13 -04:00
parent 44423acd60
commit fedf9bf2c3
1 changed files with 6 additions and 3 deletions

9
Jenkinsfile vendored
View File

@ -80,6 +80,7 @@ pipeline {
REMOVE_LOCAL_REPO = "${params.cleanup_local_repo}"
GCUBE_RELEASE_NUMBER = "${params.gCube_release_version}"
PIPELINE_BUILD_NUMBER = "${env.BUILD_NUMBER}"
TYPE = "${params.Type}"
}
// see https://jenkins.io/doc/book/pipeline/syntax/#parameters
@ -250,7 +251,6 @@ pipeline {
mv "${AGENT_ROOT_FOLDER}/settings.${PIPELINE_BUILD_NUMBER}" "${AGENT_ROOT_FOLDER}/settings.xml"
mv ${AGENT_ROOT_FOLDER}/build_commits.csv ${AGENT_ROOT_FOLDER}/build_commits.${PIPELINE_BUILD_NUMBER}.csv
cp ${AGENT_ROOT_FOLDER}/build_commits.${PIPELINE_BUILD_NUMBER}.csv .
cat *${PIPELINE_BUILD_NUMBER}.csv | echo
'''
}
echo 'The default maven settings have been restored'
@ -258,10 +258,13 @@ pipeline {
}
success {
echo 'The pipeline worked!'
emailext attachmentsPattern: "**/*.${PIPELINE_BUILD_NUMBER}.csv",
to: 'jenkinsbuilds@d4science.org',
emailext to: 'jenkinsbuilds@d4science.org',
subject: "[Jenkins build D4S] build ${currentBuild.fullDisplayName} worked",
body: "Build time: ${currentBuild.durationString}. See ${env.BUILD_URL}"
emailext attachmentsPattern: "**/*.${PIPELINE_BUILD_NUMBER}.csv",
to: 'jenkinsreleases@d4science.org',
subject: "[Jenkins ${TYPE} report] report for ${currentBuild.fullDisplayName}",
body: "Build time: ${currentBuild.durationString}. See ${env.BUILD_URL}"
}
failure {
echo 'The pipeline has failed'