Re: Email complete build report when build fails

2017-02-01 Thread jerome
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

Re: Email complete build report when build fails

2017-01-31 Thread Slide
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: '

Email complete build report when build fails

2017-01-31 Thread Kapil Garg
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}]'