Problem:

HTML is not displayed properly in the report.

Causes:

CSS is stripped out due to Content Security Policy.

https://wiki.jenkins-ci.org/display/JENKINS/Configuring+Content+Security+Policy

Solution:

Go to the following:

  • Manage Jenkins
  • Manage Nodes
  • Settings
  • Script Console

System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "")

  • Run

Drawback:

The above fix will be gone after a Jenkins restart. To make the fix permanent, add the following to JAVA_ARGS under /etc/default/jenkins:

-Dhudson.model.DirectoryBrowserSupport.CSP=""