2
votes

I followed this documentation for moving jobs between Jenkins servers. After choosing to 'Reload Configuration from Disk' I am finding that the majority of jobs were migrated however a handful of jobs are not presented within the Jenkins dashboard. Looking at $JENKINS_HOME/jobs, I see directories for jobs which did not load and confirmed the config files are valid XML. I have looked at the System Log (via the Jenkins GUI) but find nothing pertinent. Rebooting the machine and reloading configuration from disk does not resolve the problem.

Interestingly, I can see the previous build history for a specific job if I choose to create a new job with the exact same name as a job which will not load. The config.xml is overwritten when this occurs. I am hoping to preserve the job configurations without manually recreating them.

2

2 Answers

4
votes

For me I found it that I had copied the jobs over with the wrong permissions - once I ran chown -R jenkins:jenkins $JENKINS_HOME/jobs it solved the issue for me

2
votes

I chose to investigate by comparing the config.xml content for loaded and unloaded jobs. I eventually identified the issue:

Jobs which used cron syntax similar to H/* (as well as H/[number]) would not load

The issue stemmed from the fact that I migrated to a previous release of Jenkins. This cron functionality was introduced within 1.5.10 via story Jenkins-17311.

Removing the noted syntax from config.xml content allowed jobs to load during subsequent 'Reload Configuration from Disk' executions.