This command is used when a change is made to Jenkins and its environment outside the UI, such as editing config.xml files from the command line or moving jobs between folders from the command line.
How to Reload Jenkins Configution From Disk
From the Jenkins web interface, head to the “Manage Jenkins” page and click on the “Reload Configuration from Disk” button.
This will reload the config.xml file from the disk and any changes made will take effect immediately.
You can also use the Jenkins CLI to reload the configuration from the disk. Run the command as shown:
An example is as shown:
Finally, we can use the REST API in Jenkins to reload the configuration from the disk as shown:
You can make a POST request to http://jenkins_address/reload to reload the Jenkins configuration.
Example:
This may require you to pass your Jenkins credentials for authentication.
Conclusion
We discussed the various methods to reload the Jenkins configuration from disk. The Jenkins web interface provides a user-friendly way of reloading the configuration by clicking on the “Reload Configuration from Disk” button on the “Manage Jenkins” page.
Additionally, we discussed how to use the Jenkins CLI and the Jenkins REST API to reload the configuration. It is important to note that reloading the configuration from the disk will interrupt all running builds and tasks, so it is best to schedule this action during inactive periods.