Send last build HTML report in email

22 views
Skip to first unread message

Chandan Sinha

unread,
Aug 22, 2017, 10:27:01 AM8/22/17
to Jenkins Users
Hi All,


I have a job configured currently in Jenkins, that triggers a testNG execution and saves the HTML report. At the end, build sends the HTML report content in email. Now I wish to send the content of HTML report of previous build in the same email, so that recipient can see testNG result difference between the two builds.

Can you please suggest me solution for this.


Regards,
Chandan

Slide

unread,
Aug 22, 2017, 11:33:10 AM8/22/17
to Jenkins Users
If you are using email-ext, you could use a groovy template to access the previous build (build.previousBuild make sure to check for null in the case of the first run). Then you could access the workspace of that build. This is for freestyle jobs, a pipeline job may require something a little different.

Regards,

Alex

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/c6dbd90b-fbc5-4a4b-b2a6-f43fd77d4e94%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages