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
ReplyDeleteWhere 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
Thanks for sharing good information in blog content
ReplyDeleteWyDur's Managed Endpoint Security solutions offer advanced protection against cyber attacks. With our cutting-edge technology and experienced team, you can rest assured that your devices and network are fully protected. Trust WyDur to keep your business safe and secure.
Managed Security Services in Hyderabad