CI integration with Extent Reports using htmlpublisher

Vaibhav picture Vaibhav · Jan 28, 2016 · Viewed 8.2k times · Source

I am using HTML publisher plugin in Jenkins, and generating opening Extent Report. By Report generated with Jenkin don't have UI. However when I open then manually they opens just fine.

Click of Report Snapshot

Answer

Charu Jain picture Charu Jain · Jun 21, 2017

To change default Content Security Policy go to Manage Jenkins -> Script Console and add following commands:

System.clearProperty("hudson.model.DirectoryBrowserSupport.CSP");

System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "sandbox allow-scripts; default-src 'self'; script-src * 'unsafe-eval'; img-src *; style-src * 'unsafe-inline'; font-src *");

Run the Build and View the report.