-
Task
-
Resolution: Incomplete
-
Major
-
None
I have a Jenkins job which will email the Test.html report for every build. The issue here is whenever the build is success, I'm getting the email with attachment. But when the Build is failed, (even though the Test.html file is generated), I'm not getting the email itself.
I have tried to add try {} and finally{}. When I add finally in the Jenkins script, its sending some 'older' report and not the 'current generated' report.
node ('docker') {
env.ForEmailPlugin = env.WORKSPACE
emailext attachmentsPattern: 'Test1.html',
body:'''Hi , Please find the Sanity Test report!!!''',
subject:currentBuild.currentResult + " : " + env.JOB_NAME,
to: 'xxx@gmail.com'
}
That's the only thing in your Jenkinsfile?