diff --git a/Jenkinsfile b/Jenkinsfile index cb20ea5..5900be5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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'