[Anthill-pro] SVN and Triggers
Brian Dellisanti
bdd at urbancode.com
Tue Apr 24 13:48:51 CDT 2007
Curtis,
I've attached a sample of my script. It's not perfect, but it's more
maintainable.
What aspect of scaling are you concerned with? There's probably not much
that can be done about maintaining the scripts. The work the script is
doing could be reduced some. svnlook really only needs to be done once
per revision. I don't see a way to get around running grep for each
path. The only way I can think of to deal with that is to keep projects
in separate repos so the number of paths is minimized, but that makes
the maintenance worse.
Regards,
Brian
Curtis Yanko wrote:
>
> Brian,
>
> Now that I've spoken with my SVN admin that seems to be what we do as
> well. I would love to see the script you've developed though.
>
> Whta concerns me more is, as with everything these days, scaling. How do
> we support that for hundreds of projects ever time they want a new
> branch supported?
>
> - Curtis Yanko
> United Health Technologies
> Mail Route: CT028-06SA
> Internet email: curt_yanko at uhc.com
> Office 860.702.9059
> Cell 860.729.8171
>
>
>
> *Brian Dellisanti <bdd at urbancode.com>*
> Sent by: anthill-pro-bounces at caladin.urbancode.com
>
> 04/24/2007 11:44 AM
> Please respond to
> anthill-pro at caladin.urbancode.com
>
>
>
> To
> anthill-pro at caladin.urbancode.com
> cc
>
> Subject
> Re: [Anthill-pro] SVN and Triggers
>
>
>
>
>
>
>
>
> Curtis,
>
> We use them. This is described in the online help. The basic idea is to
> use svnlook to check for a change in a repo url you want to monitor and
> then use wget to post to anthill. I've been working on a somewhat nicer
> script than what is in the help. I can send it to you if you like.
>
> Regards,
> Brian
>
> Curtis Yanko wrote:
> >
> > All,
> >
> > Is anyone using SVN post-commit triggers with AHP3?
> >
> > I am wondering how to manage having SVN post to different URLs for
> > different Branches and if this is better solution than polling SVN for
> > changes(where AHP would check for changes every 10minutes or something).
> >
> > - Curtis Yanko
> > United Health Technologies
> > Mail Route: CT028-06SA
> > Internet email: curt_yanko at uhc.com
> > Office 860.702.9059
> > Cell 860.729.8171
> >
> >
> > This e-mail, including attachments, may include confidential and/or
> > proprietary information, and may be used only by the person or entity to
> > which it is addressed. If the reader of this e-mail is not the intended
> > recipient or his or her authorized agent, the reader is hereby notified
> > that any dissemination, distribution or copying of this e-mail is
> > prohibited. If you have received this e-mail in error, please notify the
> > sender by replying to this message and delete this e-mail immediately.
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Anthill-pro mailing list
> > Anthill-pro at lists.urbancode.com
> > http://lists.urbancode.com/mailman/listinfo/anthill-pro
> _______________________________________________
> Anthill-pro mailing list
> Anthill-pro at lists.urbancode.com
> http://lists.urbancode.com/mailman/listinfo/anthill-pro
>
>
> This e-mail, including attachments, may include confidential and/or
> proprietary information, and may be used only by the person or entity to
> which it is addressed. If the reader of this e-mail is not the intended
> recipient or his or her authorized agent, the reader is hereby notified
> that any dissemination, distribution or copying of this e-mail is
> prohibited. If you have received this e-mail in error, please notify the
> sender by replying to this message and delete this e-mail immediately.
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Anthill-pro mailing list
> Anthill-pro at lists.urbancode.com
> http://lists.urbancode.com/mailman/listinfo/anthill-pro
-------------- next part --------------
#!/bin/bash
TRIGGER_URL=https://anthill3.example.com/trigger
REPOS="$1"
REV="$2"
notify() {
wget --no-check-certificate "$TRIGGER_URL" \
--post-data="triggerId=$1&code=$2" -O /dev/null
}
checkpath() {
local path=$1
local id=$2
local code=$3
if svnlook changed "$REPOS" -r "$REV" | \
grep -E "^[[:print:]]+[[:space:]]+$path"
then
notify $id $code
fi
}
# path id code
checkpath ProjectA/trunk 31 wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
checkpath ProjectA/branches/1.0 32 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
checkpath ProjectA/branches/2.0 33 yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
checkpath ProjectB/trunk 34 zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
More information about the Anthill-pro
mailing list