如何不重新启动就重新加载hudson配置? [英] How to reload hudson configuration without restarting?
问题描述
我面前还有一项艰巨的任务...修改多个哈德逊作业的配置.我想要的是从命令行执行此操作.但是根据我的经验,除非您强制hudson从磁盘重新加载配置",否则它不会重新读取该配置.
我不想为了一个小小的变化而重新启动hudson ...就像在apache中进行重新加载"一样.不知道如何读取Java代码,但我猜测要保存的配置更改之后,我要寻找的部分就位于其中.
Hudson/Jenkins将其运行时配置保存在内存中,并且仅在启动时或从磁盘重载配置"时重载.
但是,从磁盘重新加载配置并不是重新启动,只是重新读取配置.
这就是您的全部选择,重新加载或重新启动.
使它无法正常工作将是一项主要任务,如果您还不能阅读 Java代码,那么我建议您不要编写它.实际上,您也需要从主项目中派生出来,因此更新将不兼容.
如果您需要通过脚本进行所有更新,然后自动重新加载配置,请使用 hudson_cli.jar
来完成.
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.
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.
这篇关于如何不重新启动就重新加载hudson配置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!