[Buildbot-devel] Setting the revision to use in a buildbot.steps.trigger.Trigger (for cross-repository triggering)

Matisse Enzer menzer at apple.com
Thu Nov 4 15:44:56 UTC 2010


The reason I ended up with more builders is that I have two repositories, one of which hosts code that depends upon the code in the the, and I want to be able to build and test either module on commit, and also test the dependent module after a commit to the independent module.

Repo A contains a module that Repo B depends upon.

When a commit happens to Repo A a builder (builder-A) runs which builds and tests the module and installs the build products in the buildslave directory, and then triggers a build of the  HEAD of dependent module which is in Repo B. Let's call the triggered builder "builder-B-HEAD"
 
When a commit happens to Repo B then a different builder is used  to build and test that module (which has a dependency on the code installed in the buildslave directory.) This builder ("builder-B-source-changed") uses the revision of the commit, not HEAD, so it cannot be the same builder that builder-A triggers.

Sent from my iPad

On Nov 2, 2010, at 4:27 AM, Benoît Allard <benoit at aeteurope.nl> wrote:

> Hi Matisse,
> 
> Matisse Enzer wrote:
>> Thanks.
>> alwayUseLatest could work- but I am trying to avoid having two builders for each "downstream" repo.
> 
> I don't see how this would imply two builders, just two Source steps, and both can (and have to) happen on the same builder if you want anyway the source of both repository on the same place. A source step is just one more step inside your builder config.
> The drawback of this method is that it won't be possible to ask buildbot to make a specific build again, as for each build, he now will store "useLatest" instead of the right revision.
> 
>> I'll see what's in the works in trac - maybe my team can help move things along.
> 
> That would be really great ! For now, buildbot has an internal state called "SourceStamp". The goal is to introduce an "AggregateSourceStamp" that would, well, be the aggregation of multiple SourceStamps, such that, and here comes the part that interest you, this object could be given to the Source Step and care about *all* the repositories.
> 
>> Because of the tendency with git to use several smaller repos I suspect this issue comes up more as gut becomes more widespread.
> 
> You are completely right, that is something highly demanded, to an extend that some people built their own tool to replace the SCM tool, (git in your case) such that with one command, multiple repositories are fetched, diffed, and so on ... Such a tool that emulate "git" is called "repo" [1].
> 
> [1] http://source.android.com/source/git-repo.html
> 
> Best Regards
> Benoît
> 




More information about the devel mailing list