If manual changes made to config.xml, hitting Jenkins > Manage >
      Reload Configuration from Disk does not seem to actually take jobs within the folder.

      Repro:
      1. Create folder
      2. Create job within folder
      3. Make changes by hand directly to Folder's config.xml
      4. Make changes by hand directly to Job's config.xml
      5. Reload config
      6. Folder has updates, but Job does not reflect changes.

          [JENKINS-28043] Reload configs of all jobs in folder

          Brantone added a comment -

          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.

          Brantone added a comment - 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.

          Jon Protaskey added a comment -

          Seems to be still occurring in 2.73.2.  Any update on this?

          Jon Protaskey added a comment - Seems to be still occurring in 2.73.2.  Any update on this?

          ymougenel added a comment -

          I used groovy script to avoid this bug, however since the scritpler plugin has been removed, this issue is getting worse: there is no way to reload a job inside a folder.

          Repro:

          1/ Change manually a job configuration (ex: repo1/jobA/config.xml)

          2/ Reload configuration from disk

          -> The job configuration is not updated

          ymougenel added a comment - I used groovy script to avoid this bug, however since the scritpler plugin has been removed, this issue is getting worse: there is no way to reload a job inside a folder. Repro: 1/ Change manually a job configuration (ex: repo1/jobA/config.xml) 2/ Reload configuration from disk -> The job configuration is not updated

          Stanley Quon added a comment -

          Any update on reloading the job configuration when the jobs are inside a folder?  Reloading will not load "config.xml" changes for jobs that exist in a folder.

          Using:  Jenkins ver. 1.642.4.1 (CloudBees Jenkins Enterprise 15.11)

           

          Stanley Quon added a comment - Any update on reloading the job configuration when the jobs are inside a folder?  Reloading will not load "config.xml" changes for jobs that exist in a folder. Using:  Jenkins ver. 1.642.4.1 (CloudBees Jenkins Enterprise 15.11)  

          John Beckerle added a comment -

          Issue still present: core version 2.190.2

          Folder plugin: org.jenkins-ci.plugins:cloudbees-folder:6.9

          John Beckerle added a comment - Issue still present: core version 2.190.2 Folder plugin: org.jenkins-ci.plugins:cloudbees-folder:6.9

          Steve Graham added a comment - - edited

          Just created a whole load of jobs in a Folder.
          Did a mass change inside the config files manually ( using a script )
          Reloaded config ManageJenkins->reload configuration from disc

          Jenkins updated, jobs inside folders were not updated
          I'll go for the above...
          *Jenkins Version 2.219 *
          ( tried it on an earlier version, thought I had done something wrong, only a few jobs so changed using Jenkins GUI .. and ignored it.)
          All latest plugins installed

          Raised it to Major
          I have many jobs in folders and changing e.g. the clearcase branch in 20+ jobs using the Jenkins GUI is not amusing when a perl one liner does it almost instantly.

          Steve Graham added a comment - - edited Just created a whole load of jobs in a Folder. Did a mass change inside the config files manually ( using a script ) Reloaded config ManageJenkins->reload configuration from disc Jenkins updated, jobs inside folders were not updated I'll go for the above... *Jenkins Version 2.219 * ( tried it on an earlier version, thought I had done something wrong, only a few jobs so changed using Jenkins GUI .. and ignored it.) All latest plugins installed Raised it to Major I have many jobs in folders and changing e.g. the clearcase branch in 20+ jobs using the Jenkins GUI is not amusing when a perl one liner does it almost instantly.

          Steve Graham added a comment - - edited

          got caught by this again - now I have more folders and jobs.
          A one line perl changes all config.xml files, expected a reload config from disk to work.
          Jenkins is constantly running jobs, a new restart is not possible.
          A reload config allows the jobs to continue.
          ( does not - my mistake, no downstream job were started, really blown my CI system )
          Does raising it to critical put more emphasis on this defect ?
          using Jenkins LTS 2.235.5
          all plugins are up to date.

          Steve Graham added a comment - - edited got caught by this again - now I have more folders and jobs. A one line perl changes all config.xml files, expected a reload config from disk to work. Jenkins is constantly running jobs, a new restart is not possible. A reload config allows the jobs to continue. ( does not - my mistake, no downstream job were started, really blown my CI system ) Does raising it to critical put more emphasis on this defect ? using Jenkins LTS 2.235.5 all plugins are up to date.

          Vitalii Dumma added a comment - - edited

          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.

          Vitalii Dumma added a comment - - edited 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.

          Jason Perrone added a comment -

          Same problem here. Need this fixed, big time.

          Jason Perrone added a comment - Same problem here. Need this fixed, big time.

          Jason Perrone added a comment -

          Vitalii, your solution worked great, thank you.

          Jason Perrone added a comment - Vitalii, your solution worked great, thank you.

            Unassigned Unassigned
            brantone Brantone
            Votes:
            14 Vote for this issue
            Watchers:
            19 Start watching this issue

              Created:
              Updated: