[Buildbot-devel] Multiple git steps and dependencies with different projects in a build
Kay Hayen
kay.hayen at gmail.com
Mon Jun 9 20:50:16 UTC 2014
Hello Dan,
Am 09.06.2014 20:24, schrieb Dan Kegel:
> On Mon, Jun 9, 2014 at 11:13 AM, Kay Hayen <kay.hayen at gmail.com> wrote:
>> While I could write a script that uses git clone, I would like to use
>> three "Git" build steps, and benefit from the caching performed by
>> Buildbot, when doing "copy" mode. I understand using one such step,
>> changes the build into a directory that is a checkout.
>>
>> How to I refer to the other ones, i.e. how to find their checkouts on
>> the slave, and what to set the git dir to, to use it for commiting and
>> pushing changes.
>
> In general, you can't depend on that, since the latest checkout
> might be on a different slave.
I think you misunderstood me there. I don't mean from previous builds,
but I mean from previous build steps.
factory = BuildFactory()
factory.addStep(
Git(
repourl='git at somehwere:repo1',
mode='copy',
)
)
factory.addStep(
Git(
repourl='git at somehwere:repo2',
mode='copy',
)
)
factory.addStep(
Git(
repourl='git at somehwere:repo3',
mode='copy',
)
)
Then I would like to run a script from "repo1" in "repo2" checkout, copy
it's results into "repo3" workspace, commit, and push.
I would need a method to access things there. In the last case, I would
need a way to access the git checkout from "source".
If I do as you say, I could after each step, move the checkout away to a
safe spot, and refer to there. And in the last step, I could use my
knowledge that "../source" is the git checkout.
But it would be a 100% nicer, if there was a way, to specify the
"source" and "build" names.
The thing that makes me want to use Buildbot here, is that of course, it
has that nice status overview, and the ability to keep git checkouts for
the builders and update them incrementally, i.e. fast and without waste.
As far as I know, having multiple different "git" repos in the "source"
wouldn't be much of an issue, as git can handle that just fine.
From looking at 0.8.8 source, I found "workdir" argument, but it has
this in its code:
# self.srcdir is where the VC system should put the sources
if self.mode == "copy":
self.srcdir = "source" # hardwired directory name, sorry
else:
self.srcdir = self.workdir
Maybe I am doing it wrong, and should have multiple builders, one per
repo, and them transferring data. But my means of data storage is "git"
in this case.
Yours,
Kay
More information about the devel
mailing list