Hi team,
Any suggestions how to permanently fix that issue, with the html publisher plugin as after restart of the jenkins server (on a k8s) it does not show the results.
To fix that the following suggestion has to be executed in the script console in order to work:
Steps:
- Go to the Jenkins Admin page (login as admin).
- Go to Manage Jenkins → Script Console
- Then in the script console copy paste following it made it work
Snippet: System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "sandbox allow-scripts; default-src *; style-src * http://* 'unsafe-inline' 'unsafe-eval'; script-src 'self' http://* 'unsafe-inline' 'unsafe-eval'");
Note for Persistency in jenkins configuration: @RayKim mentioned this is not a sustainable change. If you want to keep this change permanently then in that case you should set this property values up in the JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Dhudson.remoting.Launcher.pingIntervalSec=0"
After setting this variable you have to restart your Jenkins
to load the new configuration.
However adding the JENKINS_JAVA_OPTIONS in the k8s deployment, does not fix the problem. Any ideas how to make it working after restart happens and without human intervention to that?
Setup:
Jenkins version : 2.319.3 (running on k8s)
HTML publisher version: 1.29