diff --git a/Jenkinsfile b/Jenkinsfile index 156eebf..a4868fa 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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}" } }