Description: When I add a credential through the Jenkins UI, I can see that the credential is added in the Configuration as Code section. Additionally, I've set up Docker volumes to store configuration files that need to persist across container restarts. However, after restarting the Jenkins server, I observe the following behavior:
1- The jenkins.yaml file used to build the server remains unmodified. 2- When I check the credentials.xml on the server, I can see the new credentials that were added. 3- All I get after the server restart is the configuration from the original jenkins.yaml file on my host. My question is, is there a way to automatically update the jenkins.yaml file with the configuration changes made through the Jenkins UI before I restart my server?
I'd like guidance on how to maintain and synchronize these configurations effectively.
Description: I attempted to use the Configuration as Code (CasC) plugin to automatically retrieve the configuration and update my jenkins.yaml file. However, I encountered a challenge:
The Configuration as Code (CasC) plugin doesn't seem to provide the functionality to directly update my jenkins.yaml file with the existing configuration.