我应该将 HUDSON_HOME 的哪个部分置于源代码控制之下? [英] Which part of HUDSON_HOME should I put under source control?
问题描述
我想用 subversion 管理 Hudson 的配置文件以进行备份.Hudson Wiki 列出了 $HUDSON_HOME 的目录结构,如下所示:
I'd like to manage Hudson's configuration files with subversion for backup. The Hudson Wiki lists the directory structure of $HUDSON_HOME like so:
HUDSON_HOME
+- config.xml (hudson root configuration)
+- *.xml (other site-wide configuration files)
+- fingerprints (stores fingerprint records)
+- plugins (stores plugins)
+- jobs
+- [JOBNAME] (sub directory for each job)
+- config.xml (job configuration file)
+- workspace (working directory for the version control system)
+- latest (symbolic link to the last successful build)
+- builds
+- [BUILD_ID] (for each build)
+- build.xml (build result summary)
+- log (log file)
+- changelog.xml (change log)
显然,jobs/[JOBNAME]/builds 不应该进入源代码控制,但 config.xml 是一个不错的选择.插件和指纹不太明显.
Obviously jobs/[JOBNAME]/builds shouldn't go into source control but config.xml is a good candidate. Plugins and fingerprints are less obvious.
您如何管理 Hudson 配置?
How do you manage your Hudson configurations?
推荐答案
我确实使用 SCM 来管理我的 Hudson 配置.我为每个作业保留顶级 config.xml 和 config.xml.我有一个小脚本,用于从 Hudson 获取配置并根据需要提交/添加/删除它们(以及其他一些使管理配置更容易的花里胡哨).
I do use an SCM for managing my Hudson configuration. I keep the top-level config.xml and the config.xml for each job. I've got a little script that I use to fetch the configs from Hudson and commit/add/delete them as necessary (along with some other bells and whistles that makes managing the configuration easier).
关于 Rob Hruska 的观点,对于我的特定设置:
Re Rob Hruska's points, for my particular setup:
- 配置确实经常变化(尤其是通知)
- (参见上面的更新脚本)
- 我一直在区分事物.我们有不止一位管理员可以更新配置,这些差异很有用
话虽如此,但每种情况都是不同的.我为配置所做的管理不是(也不是)免费提供的.每晚压缩所有内容的 cron 作业肯定更便宜,而且可能也足够了.
All that said, every situation is different. The management I do for the configs didn't (and doesn't) come for free. A cron job that zips everything up nightly is definitely cheaper and may be sufficient, too.
这篇关于我应该将 HUDSON_HOME 的哪个部分置于源代码控制之下?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!