Which part of HUDSON_HOME should I put under source control?

前端 未结 3 1622
醉梦人生
醉梦人生 2021-02-04 12:54

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
         


        
3条回答
  •  萌比男神i
    2021-02-04 13:22

    A SCM probably isn't the best tool for backing up Hudson's workspace - it would be like using an Subversion to store preferences for a game or the contents of database tables for a web application. Along with that, it doesn't seem necessary for the following reasons:

    • The configuration files don't (or shouldn't) change frequently (like code), so nightly backups are sufficient.
    • When you make changes via the GUI, something's going to have to go out to the system and do an svn commit. Since this would probably be a manual step, it leaves room for human error.
    • You'll probably never need to diff your configuration changes, and for the off-chance that you might, you can just extract and look at the appropriate backups (see below).

    All in all, it would just seem a bit unwieldy to use Subversion for this task. For backing up, I would recommend just setting up a cron job that does a tar cvzf $HUDSON_HOME. You could optionally omit the build directories, but that seems a bit unnecessary if you've got enough disk space.

    Edit: Regarding the differences between this and oeuftete's answer, my answer is simply from my experiences with how I use Hudson. His/her answer definitely provides a different perspective, which is nice. I definitely agree with it in that every situation is different, and may require different means to satisfy an end.

提交回复
热议问题