[Buildbot-devel] Triggers receiving wrong branch info

Michael Rubinsky hamogram at yahoo.com
Wed May 20 06:26:03 UTC 2009


I setup our buildbot to use triggers to setup dependencies for 
particular builds.  I have a SVN repository that contains all my 
projects.  I'm using svn_buildbot.py to trigger my builds via svn 
commits.  The problem is, that when Build A Triggers Build B, Build B is 
getting the branch / path information from Build A, which in turn either 
pulls down the wrong repository or sends an invalid branch.

Here's my repo layout:

svn://myrepo/Project1/trunk
svn://myrepo/Project1/tags
svn://myrepo/Project1/branches
svn://myrepo/Project2/trunk
...

My svn step looks like this:
myfactory.addStep(source.SVN(mode='update', baseURL="svn://myrepo/"
	defaultBranch="Project1/trunk"))

My AnyBranchScheduler for each project in repository looks like this:
scheduler.AnyBranchScheduler(name = Project1 + "_anyBranch",
	builderNames=["Project1"], treeStableTimer=180,
	branches=["Project1/trunk", "Project1/tags", "Project1/branches"])

* I tried having my baseURL to the actual path of each project like
baseURL="svn://myrepo/Project1" ...
and my branches in my AnyBranchScheduler to just ["trunk", "tags", 
"branches"]
but that didn't work, because all the schedulers had listeners for just 
'trunk', 'tags', 'branches'.  Meaning any commit would trigger every 
project to start a build.  A very messy situation.  So I found the best 
way is to include the project name first.


My Triggers are simply:
scheduler.Triggerable(name="Project1_trigger", builderNames=["Project1"])

Now this is the problem.

Project1 has a dependency that Project2 must be built and linked in 
first.  So the first step in Project 1 is to trigger Project 2.

This works fine via 'force build' and 'nightly' because it builds off 
trunk.  This breaks, when using a SVN commit and using the hook.

# svn commit Project1/trunk/main.c -m "My big change"

Now Project1 reports the branch as "Project1/trunk" and the file as 
"main.c".  Which is ok, however when it  triggers Project2, it sends the 
branch as "Project1/trunk" which causes Project2 to build Project1 in 
/build/Project2.

This is even messier with tags, such as committing a tag to 
Project1/tags/0.5/main.c

Project2 is triggered with the following branch "Project1/tags/0.5"

I tried tweaking my split_file function to have it just pass the 
relative path.  However that would send /tags/0.5 to Project2 which 
didn't have that tag.

I want my triggers to basically either be fed a build, or by default 
build trunk.

I hope that's enough information to understand the problem.  It's been 
racking me for 2 days now.








More information about the devel mailing list