Deploy notifications to commiter
This commit is contained in:
parent
56efd89fa5
commit
b788b251b7
|
@ -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}"
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue