[Catalyst] Post deployment application management

Jason Kohles email at jasonkohles.com
Thu Sep 14 16:31:06 CEST 2006


On 9/14/06, Bill Moseley <moseley at hank.org> wrote:
>
> Another "deployment" question: I have a staging server (well, it's on
> the same machine) where they can view and test changes.  I'd like to
> have that server get automatically updated with changes quickly after
> checkins.   Any ideas other than having cron run svn update every few
> minutes (e.g.  perhaps a post-commit script)?
>
That's how I do it, my post-commit script looks something like this...

#!/bin/sh
REPO="$1"
REV="$2"

AUTHOR=`svnlook author -r$REV $REPO`
DATE=`svnlook date -r$REV $REPO`

(
    echo "To: project-commits at domain.com"
    echo "From: subversion at domain.com"
    echo "Subject: Commit to $REPO by $AUTHOR (rev $REV)"
    echo
    echo "Author: $AUTHOR"
    echo "Date: $DATE"
    echo "Repository: $REPO"
    echo "Revision: $REV"
    echo
    echo " *** Changelog ***"
    svnlook log -r$REV $REPO
    echo '----------------------'
    echo " *** Changed Files ***"
    svnlook changed -r$REV $REPO
    echo '----------------------'
    echo " *** Staging Update ***"
    cd /var/staging
    svn update -r$REV
    echo '----------------------'
    echo " *** Test Results ***"
    perl Makefile.PL
    make test
    echo '----------------------'
    echo " *** Build Results ***"
    make tardist
    echo '----------------------'
) | /usr/lib/sendmail -t -oi -oem

-- 
Jason Kohles
email at jasonkohles.com - http://www.jasonkohles.com/
"A witty saying proves nothing."  -- Voltaire



More information about the Catalyst mailing list