Email with pipeline results.

This commit is contained in:
Manuele Simi 2019-10-10 12:21:52 -04:00
parent 1f9b2fac31
commit 834e7c462e
1 changed files with 8 additions and 2 deletions

10
Jenkinsfile vendored
View File

@ -196,14 +196,20 @@ pipeline {
// post-build actions
post {
always {
mv "${agent_root_folder}/settings.${PIPELINE_BUILD_NUMBER}" "${agent_root_folder}/settings.xml"
echo 'The default maven settings have been restored'
echo 'The default maven settings have been restored'
mv "${agent_root_folder}/settings.${PIPELINE_BUILD_NUMBER}" "${agent_root_folder}/settings.xml"
}
success {
echo 'The pipeline worked!'
mail to: 'jenkinsbuilds@d4science.org',
subject: "gCube pipeline worked: ${currentBuild.fullDisplayName}",
body: "Something is wrong with ${env.BUILD_URL}"
}
failure {
echo 'The pipeline has failed'
mail to: 'jenkinsbuilds@d4science.org',
subject: "gCube pipeline has failed: ${currentBuild.fullDisplayName}",
body: "Something is wrong with ${env.BUILD_URL}"
}
}