Through Jenkins use newman command, i am trying to publish HTML file and sending it same file via e-mail. I can see published HTML file showing proper format inside the Jenkins without any problem but, full format in missing in the e-mail [ may be it is not properly rendering CSS and JavaScript].
I guess if it is Jenkins content security policy issue, it should have not displayed properly inside Jenkins. I don’t see any problem in Jenkins.
Is there anything i need to use customize HTML file using template?, i try both HTML and extra-export HTML didn’t work to get it in proper format over the mail.
sh(script: 'newman run ./jenkins_jobs/newman/collection/$JOB_NAME/collection.json --reporters htmlextra,cli,junit,html --disable-unicode --reporter-junit-export newman_result.xml --reporter-htmlextra-export newman_result.html --reporter-html-export newman_result_html.html || true')
emailext (
mimeType: 'text/html',
to: "${EMAIL_TO}",
attachLog: true,
subject: '$DEFAULT_SUBJECT',
body: readFile("${env.WORKSPACE}/newman_result.html"),
Please help me to fix this.
Thanks,