Hi, I faced same issue. I need to update job and folders config.xml files manually and then get changes reflected in Jenkins. jenkins-cli reload-configuration was not working for jobs under folders. and "Reload Configuration from Disk" (in UI) was also not working.
TEMP SOLUTION (which worked for me):
create file: reload-configuration.groovy with content
import jenkins.model.Jenkins;
import hudson.model.AbstractItem;
import java.io.InputStream;
import java.io.FileInputStream
import java.io.File;
import javax.xml.transform.stream.StreamSource;
Jenkins.instance.getAllItems(AbstractItem.class).each{job ->
def configXMLFile = job.getConfigFile();
def file = configXMLFile.getFile();
if (file.exists()) {
InputStream is = new FileInputStream(file);
job.updateByXml(new StreamSource(is));
job.save();
println("Config reloaded: " + job.fullName);
}
}
And then run it with (add your auth method if needed):
java -jar jenkins-cli.jar -s https://${JENKINS_ADDRESS}/ groovy = < reload-configuration.groovy
This script goes through all items (jobs/folders) and updates their configs.
Please let me know if something is not clear in this explanation.
I tried that a few times (jenkins 1.642, folder plugin 5.1) with no luck, but then on "one more try" it did work. Go figure
very odd.
K, so for current ticket purpose, although unwieldy if lots of jobs, the direct POST to job /reload is a good workaround.
Thank you kindly sir.