[Anthill-pro] Triggers + SVN - not working

Byron Vonthal Byron.Vonthal at marketlive.com
Wed Jun 13 10:28:46 CDT 2007


Triggers works great for me; in fact too good that you can actually
start another build while the first is going.  I did notice that the
online documentation has the 'if' statement all on one line which does
not work.  The documentation also has a different example between the
docs and within the application, one did not work.

I am using subversion with AntHillPro 3.2
Here is an example of my trigger file on my repository server.

svn/repo/hooks/post-commit

if [ -n "$(svnlook changed /opt/svn/repo -r $2 | grep
marketlive/modules/EndecaConnector/trunk)" ] 
then wget -t 0 https://qa-server-win:8888/trigger
--post-data='triggerId=16&code=8a1c5381b307b7c75034830742523ef3e426e3a1'

fi

The triggerId comes from antHillPro when you create the trigger. 
You can play with the wget command on your repository server until it
actually triggers.

Good Luck.


-----Original Message-----
From: anthill-pro-bounces at lists.urbancode.com
[mailto:anthill-pro-bounces at lists.urbancode.com] On Behalf Of Ryan Smith
Sent: Wednesday, June 13, 2007 6:12 AM
To: anthill-pro at lists.urbancode.com
Subject: Re: [Anthill-pro] Triggers + SVN - not working

Mikal,

Running the wget command manually, what do you get? Does it not trigger 
the build when done this way? If you could send us the wget command at 
support at urbancode.com and what version of wget you are using.

It will not be triggered by a browser hitting the URL since the request 
must be a HTTP POST instead of a GET.

Below is our snippet for setting this up:


    Configuring Subversion

In the post-commit hook script in your SVN repository, you add a check 
to see that the changed information is on the path to your project. Then

you use a utility like wget to generate an http request to the URL 
specified in the trigger.

if [ -n "$(svnlook changed /data/svn/mycompany/myproject -r $2 | grep 
trunk)" ] then wget -t 0 https://server/trigger 
--post-data='triggerId=31&code=95cde532437151c551cf062bf93c0d12de9209c7'
fi

If we wanted to change this script to target a branch of the project 
instead of the trunk, we would change the script to be:

if [ -n "$(svnlook changed /data/svn/mycompany/myproject -r $2 | grep 
branches/june_release)" ] then wget -t 0 https://server/trigger 
--post-data='triggerId=31&code=cf062bf93c0d12d95cde532437151c551e123456'
fi


Ryan Smith


Mikal Todd wrote:
> I've spent about an hour attempting to get triggers to work and noted 
> the earlier post by Doug Bell regarding triggers when it suggested a 
> manual build and then try the triggers again.
>  
> I have done the same as Doug, got the trigger setup, ran it with 
> firefox/wget and still no build or anything in fact. Dead as a piece 
> of driftwood.
>  
> Tried deleting/changing triggers.. tried creating/changing them on 
> different projects. Still no luck.
>  
> I'm using AHP Version 3.2.1.b112
>  
> Help!
>  
> Thanks
>
> Mike
>
------------------------------------------------------------------------
>
> _______________________________________________
> Anthill-pro mailing list
> Anthill-pro at lists.urbancode.com
> http://lists.urbancode.com/mailman/listinfo/anthill-pro
>   

-- 
===========================================================
Ryan Smith.           		2044 Euclid Ave., Suite 600
Lead Developer                  Cleveland, Ohio 44115
Urbancode, Inc.
                                email:  rws at urbancode.com
web:     www.urbancode.com      phone:  216-858-9000
web:     www.anthillpro.com     fax:    216-858-9602
===========================================================

_______________________________________________
Anthill-pro mailing list
Anthill-pro at lists.urbancode.com
http://lists.urbancode.com/mailman/listinfo/anthill-pro


More information about the Anthill-pro mailing list