Adjust filename for attachments. Add email ext to README.

This commit is contained in:
Manuele Simi 2019-10-22 08:56:23 -04:00
parent 591cc0d31a
commit f9de2f145e
2 changed files with 4 additions and 2 deletions

3
Jenkinsfile vendored
View File

@ -250,6 +250,7 @@ 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'
@ -257,7 +258,7 @@ pipeline {
}
success {
echo 'The pipeline worked!'
emailext attachmentsPattern: "**/${PIPELINE_BUILD_NUMBER}.csv",
emailext attachmentsPattern: "**/*.${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}"

View File

@ -8,7 +8,8 @@ Jenkins Pipeline script to manage a complete gCube release.
* [Pipeline: Maven](https://plugins.jenkins.io/pipeline-maven)
* [Pipeline: Basic Steps](https://plugins.jenkins.io/workflow-basic-steps)
* [Kubernetes](https://plugins.jenkins.io/kubernetes) (for the YAML parser)
* [NodeLabelParameter](https://plugins.jenkins.io/nodelabelparameter) (The node and label parameter plugin allows to dynamically select the node on which a job should be executed.)
* [NodeLabelParameter](https://plugins.jenkins.io/nodelabelparameter) (to allow to dynamically select the node on which a job should be executed)
* [Email Extension](https://plugins.jenkins.io/email-ext) (to send emails with attachments)
* Jenkins configured with a JDK global tool named 'OpenJDK 8'
* Jenkins configured with a Maven global tool named 'Maven 3.6.2'
* One or more Jenkins agents labeled as 'CD'