Reputation: 6188
I am a new Jenkins user who is trying to be an administrator. I was trying to reload Jenkins to resolve an issue with Extent Reports not displaying properly. I shut down Jenkins and passed this command upon restart from the command console:
java -Dhudson.model.DirectoryBrowserSupport.CSP="" -jar jenkins.war
Upon restart, Jenkins loaded up a whole new configuration and all my users, jobs, etc., are gone. There is no backup folder, but I can see the user files and the old jobs there.
Is there any way that I can restore, import, what have you, to get my stuff back or am I pretty much screwed and will have to create all this stuff from scratch?
Upvotes: 0
Views: 1021
Reputation: 924
Please try to use the job import plugin and let me know if it worked. Also the fix for you Extent report , you didnt have to run that command. There is actually one line of script that you should run within jenkins and will fix the issue. Job Import Plugin
To fix Extent Report: You need to change default Content Security Policy go to Manage Jenkins -> Script Console and type into console the 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 *");
Then try to the view Web Report again.
Upvotes: 1