-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
Jenkins 2.88
My job is running an ANT script which contains a JUnit task followed by a junitreport task. The junitreport task is set to generate a no-frames html report, which is then published through the HTML Publisher plugin.
After being published, the report loses all of its pretty CSS formatting, and the javascript which is the part of the html report is not working. Also does not work if I open it from the workspace; only displays correctly when I open it as a local file.
See attached screenshots (published report, the report shown from the workspace and the report opened as a local file - only the latter is correctly displayed).
The file itself is also attached, to give an example of what the ANT junitreport task typically generates as html.
This will be related to the Content Security Policy. You will need to set a system property with specifications of what to allow. (You can see the errors if you see the console of the browser when you go to the page). Note any change to the Content Security Policy requires a rebuild of the job and it won't fix any existing HTML reports. See https://wiki.jenkins.io/display/JENKINS/Configuring+Content+Security+Policy for details.