Forum: CFEngine Help Subject: Re: What SVN hooks do you use in pre-commit / post-commit? Author: sauer Link to topic: https://cfengine.com/forum/read.php?3,20355,23914#msg-23914
I use the trunk as the main development branch (with development happening in separate branches and getting merged back in to trunk upon succesful testing), and have hooks to ensure that commits reference Trac tickets. Anyone can commit to the trunk and to branches. I then have tags for releases (say, 2011_11 for the november release). I control creation of tags by blocking commits from Apache, so that can only be done locally through file:// URLs (which can only be accessed by Apache and root, baased on file permissions); I have a script run through a web page which generates the tags. The script logs who ran it. Then there's another script which does a "svn switch" on the actual production and test config directories, switching the production or test directory to whatever release is appropriate. That's also loggged. I've been toying with automating the reintegration of a branch into the trunk and blocking that commit in Apache as well, but automated merging mildly sc ares me. If any changes are made to the deployment directories or repository outside of the process, they are accompanied by a thorough beating. ;) But since committs are all logged, we've got a pretty solid audit trail. And since it's all in svn, we can pretty easily revert unapproved changes. Continuing to drift off-topic, I have a custom workflow in Trac which moves from open->assigned->working->tested->closed. I create milestones for each release, and before tagging the trunk as ready for a release, I have a report which shows all of the tickets related to a milestone. If they're in the testing phase, we know that the milestone isn't ready; everything needs to either be closed (and implementable) or new/assigned (and ok to move to the next milestone). This also eases testing and changelog stuff, because I can just find all closed tickets and group by milestone to see what happened in each release. One could theoretically extend precommit hooks to only allow, say, a commit to production which references a ticket in a certain workflow state, then have that commit move the ticket to the next workflow state (say, moving a ticket from tested to approved routes for review, then commits to the production branch are only allowed if it references a ticket in the appr oved state, and the post-commit moves the ref'd ticket to "closed"). but that's a whole lot of work to just avoid communication. ;) _______________________________________________ Help-cfengine mailing list [email protected] https://cfengine.org/mailman/listinfo/help-cfengine
