[p4] continuos integration triggers

Stephen Vance steve at vance.com
Thu Aug 5 04:06:59 PDT 2010

Don't do it with a post-submit trigger. That will tie up the server and 
the return from the submit command until it finishes and won't let you 
sequence the builds properly (think, what if two people submit 10 
seconds apart for my 20 minute build). A review daemon or CI build tool 
(e.g. Cruise Control, Hudson, AntHill Pro, etc.) is the better mechanism.

Do it on a dedicated machine. Writing distribution logic usually isn't 
worth the hassle unless you need multi-platform builds or your workload 
is so great you need to farm it out.

Don't do selective integration (i.e. @$changeid,$changeid). If you're 
doing this continuously, then each integration is going to be 
incremental on the previous anyway. Just integrate from @$changeid.

If you do it on the submitter's machine, it does not require the user's 
client specs to view both branches. It simply requires two different 
client specs. There are many problems with your original assumption on 
this point. First, using a single client spec would force the user and 
the build automation user to share a client spec and you shouldn't share 
client specs. Second, keeping only one branch in a client spec helps you 
ensure that changelists don't span branches and that changes are only 
applied once from which they are integrated.


On 8/4/10 21:21 PM, G2345C wrote:
> Hello all,
> i am ttrying to do this task, but would like to hear more ideas from you.
> let says i have 2 branches //depot/main/... and //depot/dev/...
> i would like to have a post-submit trigger on the //depot/main/... that will continuosly integrate new submitted changelist id into //depot/dev/... branch but only create a pending changlist id with those integrate files (not submit for now).
> i have 2 ideas:
> 1. perform on the submitter's machine
> create a pending chagelist called $pchangelist
> then: p4 -p $port -u $user -c $client -H $host integ -c $pchangelist //depot/main/...@$changeid,$changeid //depot/dev/...
> 2. perform on a dedicated machine for this task.
> create a pending chagelist called $pchangelist
> then: p4 -p $port -u $dedicateuser -c $dedicateclient -H $dedicatehost integ -c $pchangelist //depot/main/...@$changeid,$changeid //depot/dev/...
> the problem with idea #1 is that, the user's client specs must set to view both branches. May be more...
> what do you think? and what do you think is best for this task?
> thanks
> _______________________________________________
> perforce-user mailing list  -  perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user

Stephen Vance

More information about the perforce-user mailing list