If you would like to send html report through Jenkins email notifications and looking for how to embed html report within the Jenkins email notifications, you can follow below steps:
Prerequisite
Ensure that your Jenkins has email-ext-plugin installed. If not, refer this and install it first.
Steps
Follow below steps to embed html file in email content:
Example
For example, below is the absolute path for your html file. So you just need to pick bold marked as relative path and mention in path.
/app/jenkins/jobs/myjob/workspace/my-maven-module/target/site/surefire-report.html
${FILE,path="my-maven-module/target/site/surefire-report.html”}
This will place the surefire-report.html content in your email body.
Hope this tip is helpful for you.
Prerequisite
Ensure that your Jenkins has email-ext-plugin installed. If not, refer this and install it first.
Steps
Follow below steps to embed html file in email content:
- Go to your jenkins job and click on Configure.
- Go to Post Build Actions and then select Editable Email Notifications
- Select Content Type as HTML(text/plain)
- In the default content section replace $DEFAULT_CONTENT with following
Example
For example, below is the absolute path for your html file. So you just need to pick bold marked as relative path and mention in path.
/app/jenkins/jobs/myjob/workspace/my-maven-module/target/site/surefire-report.html
${FILE,path="my-maven-module/target/site/surefire-report.html”}
This will place the surefire-report.html content in your email body.
Hope this tip is helpful for you.
I am always searching online for articles that can help me. There is obviously a lot to know about this. I think you made some good points in Feat ures also. Keep working, great job! Edmonton laser hair removal
ReplyDeletewhen i am using this procedure, i am getting same path as string in my email body, not html report. I selected default content type as HTML type.
ReplyDeleteI'm getting the same issue. Is anyway to fix this?
DeleteHi Bharath,
DeletePlease provide complete path of the report.html file.
below code embeds the report content in email body
ReplyDeleteuse pre tag(this editor not allowing to add pre tag)
pre
${FILE,path="report/report.html"}
/pre
Not working for me
DeleteGreat article with lots of useful information on AWS Training in Chennai wonderful explanation on AWS Courses.
ReplyDeleteAWS Training Center in Chennai | Best AWS Training in Chennai | AWS Training Institute in Chennai
Hello
ReplyDeleteI am using following in the path:
${FILE,path="C:/Cucumber/report/index_E2E.html"}
I am able to see the HTML and tags in it. but the 2 PNG files which are pie charts for the pass - Failed scenarios, is not showing.
Instead only a small cross in a box is displayed.
When I am opening the index_E2E.html, I am able to see the png files correctly.
Ever faced this issue?
Same issue in my case as well
ReplyDeleteI am always getting same path as string in my email body
ReplyDeleteIt is not fetching the desired output, it is simply dumping the {FILE} part on the email.Any suggestions?
ReplyDeletehi , UI not showing properly in the email can you help me on this.
ReplyDeleteusing the same steps integrated for extent report but the report not showing properly in the email . Please give any suggestion.
ReplyDeleteNot working
ReplyDeleteSHREE SAI PACKERS AND MOVERS
ReplyDelete#18/3, 30ft road,, sri krishna colony,
kuduregere main road,, alur post,
Bangalore, Karnataka 562123
080736 70915
Packers and movers bangalore
Guru TV Repair
52 shampura main road, Munni veerappa layout
Kaval bairasandra
Bengaluru, Karnataka 560032
080888 33910
Led tv repair in bangalore
Graphica Gauges and Tools
S. No. 37, Ramnagar, Ramnagar Tempo Chowk,Vadgoensheri
Pune, Maharashtra 411014
098508 84992
Thread Ring Gauges
iRobo Wellness Private Limited
AryaHub Mall No. 22
Hope farm Junction Whitefield
Bangalore, Karnataka 560066
099806 58125
Massage chair
Where to play at LuckyDays Casino? - DrMCD
ReplyDeleteLucky Days Casino was in town the night before 여수 출장샵 the 계룡 출장안마 casino was opened in 순천 출장마사지 and Lucky 경상북도 출장마사지 Days Casino is a 화성 출장샵 very large casino in the state of