0
votes

After updating macOS to Mojave (10.14.4), my Mac was restarted and upon opening Jenkins (at localhost:8080) it appeared that I've lost all my jobs and the entire system configurations.

There was only 1 user (admin) defined in my installation and my usual password was deemed invalid, when I tried to log back in. So, I tried entering another password I normally used and it was accepted. I then found that all my jobs and configs have disappeared. It looked as if I've just started Jenkins for the first time.

Looking through here on StackOverFlow, there were suggestions to check the JENKINS_HOME variable to find out where the jobs are saved on the disk, but when I typed export $JENKINS_HOME I just get an empty response. So, it looks like I've never configured it during set up.

I then dig through the hard drive and found the folders matching the names of the jobs I created under ~/.jenkins/workspace. However, the contents of all the folders are empty. I was expecting to see the usual files, e.g. build.xml, config.xml, etc.

I then did a global search for build.xml and config.xml on Mac Finder it turned up nothing.

Any idea where my jobs went and what could have caused all the contents of the folders of the jobs to be empty?

2
How are you installed your Jenkins? - JRichardsz
I installed it using the package installer for macOS which I downloaded from Jenkins website. - Nanda Won

2 Answers

0
votes

You can find your Jenkins installation directory in "Manage Jenkins" -> "configure System" --> "Home directory". Find what was the Jenkins home before you restart MAC. It looks like your home directory is either deleted by you or you are pointing to new folder now. Set it to earlier folder.

0
votes

If can help, I'm having a similar problem.

The curious part is about the new directory after the service restart ".jenkins" directory inside :

'/var/root/'.

And now, the password that Jenkins request me is not from

'/Users/username/.jenkins/secrets/initialAdministratorPassword' but from the newst one with same path pattern.

Simon