Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to have more than one source checkout step in BuildBot?

Tags:

buildbot

Is it possible to have more than one source checkout step in BuildBot? I can't find any explicit documentation of this, but it appears that doing a source checkout in BuildBot also changes the current working directory to the checkout directory, which means it's unclear where one would "go" to checkout from another repository and then run a script that uses both.

Consider the example at http://buildbot.net/buildbot/docs/0.8.1/BuildFactory.html:

From the steps, it appears that a CVS checkout is performed and then make build is run. That is two steps in BuildBot, which is convenient.

However, if you were do to the equivalent from the command line, it would be three steps:

cvs co $CVSROOT
cd directory_that_was_created
make build

Where does the cd directory_that_was_created step happen in BuildBot?

But more importantly, what if I want to have two source.CVS (well, really source.Git) steps? What directory am I in after I run the second step? Does the second repo end up in a subdirectory of the first repo?

With Git, it seems like I could make one a submodule of the other to ensure that they would both get checked out in one step, though I would prefer not to do that, if possible.

like image 912
bolinfest Avatar asked Oct 07 '22 20:10

bolinfest


1 Answers

OK, I figured this out. I did not realize that there is the concept of a "workdir" associated with each step that indicates where the "work" happens. The default workdir for all steps is a directory named build.

On http://buildbot.net/buildbot/docs/latest/manual/cfg-buildsteps.html under Source Checkout -> Common Parameters -> workdir, it does acknowledge that source steps are special "in that they perform some operations outside of the workdir (like creating the workdir itself)."

This explains why there is no explicit step that corresponds to a cd command in my above example. To solve my problem, I created two Git steps, each with its own workdir value. This is followed by subsequent ShellCommand steps that call into the appropriate directory, knowing that the two workdir directories will be siblings of one another.

like image 173
bolinfest Avatar answered Oct 10 '22 04:10

bolinfest