Add mail notification to Jenkinsfile
parent
677de074c7
commit
15950f6e26
|
|
@ -48,4 +48,21 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
script {
|
||||||
|
def commiterEmail = sh(script: 'git log -1 --pretty=format:%ae', returnStdout: true).trim()
|
||||||
|
emailext(
|
||||||
|
to: "${committerEmail}",
|
||||||
|
subject: "Jenkins Job Completed: ${env.JOB_NAME} #${env.BUILD_NUMBER}",
|
||||||
|
body: """
|
||||||
|
El job '${env.JOB_NAME}' con número de build ${env.BUILD_NUMBER} ha finalizado.
|
||||||
|
|
||||||
|
Estado: ${currentBuild.currentResult}
|
||||||
|
|
||||||
|
Revisa los detalles del build en: ${env.BUILD_URL}
|
||||||
|
"""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue