Search code examples
hudson

How to reload hudson configuration without restarting?


I have a large task ahead of me...modifying several hudson jobs' configuration. What I would want is to do it from command line. But per my experience, hudson will not re-read the configuration unless you force it to "reload configuration from disk".

I don't want to restart hudson just for a small change...like doing a "reload" in apache. Don't know how to read a java code but I'm guessing that what I am looking for lies in the part after saving configuration changes.


Solution

  • Hudson / Jenkins holds it's runtime configuration in memory, and only reloads it at startup or when you "reload configuration from disk".

    However, reload configuration from disk is not a restart, just a re-read of the configuration.

    That's all your choices, reload or restart.

    Hacking it to work differently would be a major task, and if you can't yet read Java code, I wouldn't advise you to write it. Effectively you'd need to fork from the main project too, so updates won't be compatible.

    If you need to do all the updates via a script, and then auto-reload the config, use hudson_cli.jar to do it.