Deploy notifications to commiter

This commit is contained in:
Juan Ferrer 2019-01-08 16:27:47 +01:00
parent 56efd89fa5
commit b788b251b7
1 changed files with 7 additions and 8 deletions

15
Jenkinsfile vendored
View File

@ -16,12 +16,11 @@ try {
node {
stage ('Checkout') {
checkout scm
echo env.GIT_COMMITTER_NAME
echo env.GIT_AUTHOR_NAME
echo env.GIT_USER
echo env.CHANGE_AUTHOR
echo env.CHANGE_AUTHOR_DISPLAY_NAME
echo env.CHANGE_AUTHOR_EMAIL
env.GIT_COMMIT_EMAIL = sh (
script: "git --no-pager show -s --format='%ae'",
returnStdout: true
).trim()
echo "Commiter: ${env.GIT_COMMIT_EMAIL}"
}
stage ('Build') {
nodejs('node-lts') {
@ -56,13 +55,13 @@ try {
}
mail(
to: 'juan@verdnatura.es',
to: env.GIT_COMMIT_EMAIL,
subject: "Pipeline success: ${env.JOB_NAME} (${env.BUILD_NUMBER})",
body: "Check status at ${env.BUILD_URL}"
)
} catch(e) {
mail(
to: 'juan@verdnatura.es',
to: env.GIT_COMMIT_EMAIL,
subject: "Pipeline failed: ${env.JOB_NAME} (${env.BUILD_NUMBER})",
body: "Check status at ${env.BUILD_URL}"
)