You can set a variable global and set it during various step/stage. Then
when you throw you could known what was the last thing done and append it
to the email info with the error info too
def my_last_seen_step = "start"
try
{
stage('Checkout')
{
my_last_seen_step = 'che
If you know the filename, you could use the attachments parameter for
emailext (uses an ant file pattern) to attach the file to the email.
On Tue, Jan 31, 2017, 13:29 Kapil Garg wrote:
> This is my current code to send email on failing builds.
>
> def notifyFailed() {
> hipchatSend (color: '
This is my current code to send email on failing builds.
def notifyFailed() {
hipchatSend (color: 'RED', notify: true,
message: "FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'
(${env.BUILD_URL})"
)
emailext (
subject: "FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'