[Buildbot-devel] Still have problems with schedulers passing wrongbranches

Bailey, Darragh dbailey at hp.com
Wed Aug 26 13:13:16 UTC 2009


 
> -----Original Message-----
> From: Gavin [mailto:gavin at 16degrees.com.au] 
> Sent: 26 August 2009 12:42
> To: 'buildbot-devel list'
> Subject: Re: [Buildbot-devel] Still have problems with 
> schedulers passing wrongbranches
> 
> I'm not sure using branch=None is helping matters.

That was set only on the old schedulers. The reason being is that whatever I set on the scheduler would override the defaultBranch in the builder, which is not necessarily a problem, except that this property is carried forward into any triggerable scheduler.

> Im also not sure of your exact svn setup. Considering your BaseURL
> exception, perhaps you should try using that in all your factories.
> 
> Here is an example of what we use.
> 
> c['schedulers'].append(AnyBranchScheduler(name="on-rat-commit",
>                          branches=["incubator/rat/main/trunk"],
>                          treeStableTimer=2,
>                          builderNames=["rat_trunk"]))
> #builders
> 
> f2 = factory.BuildFactory()
> f2.addStep(SVN(
>     mode="clobber",
>     baseURL="http://svn.apache.org/repos/asf/",
>     defaultBranch="incubator/rat/main/trunk",
> ))

The example I gave shows what happens when I switched from using 'branch=None' in the scheduler to 'branch="branches/branchC"' in order to trigger a build whenever a commit to "branches/branchC" was seen by the build master. This value then overrides the use of 'defaultBranch="trunk"' in the triggered build which is not what is wanted. Using BaseURL in the SVN source step for buildA just meant that it would end up getting run with 'branch="branches/branchC"' instead of 'branch="trunk"'. 

Basically it seems that setting the branch in the Scheduler will override the defaultBranch in any of the builders subsequently run by this scheduler or triggered by builds run by this scheduler. Setting the branch to None will result in all changes off-branch triggering a build that run's on a branch, or if you use fileIsImportant, will result in changes being listed as being included in the build but not important enough to trigger it, but at the same time they are not really included.


> Note that if you go and browse 
> http://svn.apache.org/repos/asf/ you will see
> 100+ projects there, I have one Buildbot master managing all 
> of the projects
> that want to use it and use a modified svn post-commit hook 
> to send the
> branch info to buildbot (via svn_buildbot.py), all other 
> non-participating
> branches are ignored. Probably straying off-topic there, but 
> anyway, perhaps
> using baseURL combined with branches/defaultBranch might put 
> you on the
> right track.


Might help if I improve the problem definition:

I cannot find a way to have a build triggered by a commit on a particular branch, be able to trigger (via a trigger step) a build on a completely different branch.

The reason I'm using a trigger step is so that I can pass some information via build properties to the triggered build.

The initial builds that I have each produce an iso. The build they trigger then controls what is done with that iso, i.e. digitally sign each package within the iso. This only works with the most uptodate code on trunk, so whatever branch the iso is generated from, the final step needs to use code from the trunk.

--
Regards,
Darragh Bailey

Systems Software Engineer
Hewlett Packard Galway Ltd.

Postal Address:    Hewlett Packard Galway Limited, Ballybrit Business Park, Galway
Registered Office: Hewlett Packard Galway Limited, 63-74 Sir John Rogerson's Quay Dublin 2
Registered Number: 361933 





More information about the devel mailing list