[Buildbot-devel] Perforce (P4) commit trigger
Ben Hearsum
bjhearsu at learn.senecac.on.ca
Wed Sep 6 13:25:13 UTC 2006
I actually haven't worked with Perforce before but my guess is that the
branch option for the Scheduler needs to be the same as name of the
branch in the Perforce repository.
Tony Walker wrote:
> Hi,
>
> Thanks for the information. Ok, so I have set up a p4poller in the
> master config file like this:
>
> p4_source = p4poller.P4Source(p4port="192.168.0.80:1666",
> p4user="general",p4client="buildmaster",
> p4base="//depot/Dev/Projects/Sublines/stage_a/...",
> p4bin="/usr/local/bin/p4",pollinterval=300)
>
> and a scheduler to suit:
>
> c['schedulers'].append(Scheduler(name="all", branch="stage_a",
> treeStableTimer=2*60, builderNames=["builder_a","builder_b"]))
>
>
> What I have noticed from the log on the buildmaster side is that it now
> seems to be polling the perforce repository, which is great, and it gets
> a submitted change. However, it doesn't seem to kick off a build 'two
> minutes' later. I noticed that in the 'scheduler.py' file, two branches
> are getting compared, change.branch and self.branch. Now,
> self.branch=stage_a (which is correct), but change.branch=None ?? So it
> won't build. So my question is, where is this supposed to be set? I can
> assume at this point that p4poller.py is extracting information and
> setting these variables up, but missing the branch, is this correct? Any
> ideas would be greatly appreciated.
>
> Thanks,
>
> Tony.
>
> Ben Hearsum wrote:
>> I haven't used the P4 modules before, but I believe you would use the
>> P4Source module along with a Scheduler. The P4Source would submit
>> changes to the BuildMaster and the Scheduler can be configured to build
>> after the tree is quiet for X minutes.
>>
>> Documentation can be found here:
>> http://buildbot.sourceforge.net/manual-0.7.4.html#P4Source
>> http://buildbot.sourceforge.net/manual-0.7.4.html#Scheduler-Types
>> http://buildbot.sourceforge.net/API-0.7.4/buildbot.scheduler.Scheduler-class.html
>>
>>
>> Tony Walker wrote:
>>
>>> Hi,
>>>
>>> I have a buildmaster with several buildslaves. Our Perforce
>>> repository resides on a separate machine on our network. What I would
>>> like to know is how do I trigger a build on one of the slaves after a
>>> piece of code has been checked in to perforce on a particular branch.
>>> Has anyone done this before? We use triggers quite a lot in perforce,
>>> for example, we have a script that emails changes to staff. So, how
>>> do I issue a command to the buildmaster (that resides on a different
>>> machine) to start a build after there has been a commit?
>>>
>>> Thanks,
>>>
>>> Tony.
>>>
>>>
>
More information about the devel
mailing list