2

I have multiple git repositories to have some interdependencies between them. I need to check all of them out when doing a full system build.
With buildbot, I can use the mode='clobber' parameter to the Git source class constructor, but this causes all of the repositories to be checked out each time:

factory.addStep(Git(repourl='ssh://build@build/repo1', mode='clobber', workdir='build/repo1'))
factory.addStep(Git(repourl='ssh://build@build/repo2', mode='clobber', workdir='build/repo2'))
factory.addStep(Git(repourl='ssh://build@build/repo3', mode='clobber', workdir='build/repo3'))

I would like to use mode='copy', but when I do that, the source for all three repositories gets checked out in the same location, eg. .../source/ rather than .../source/repo1 .../source/repo2 .../source/repo3

Is there a way to indicate to buildbot to keep clean copies of each repository separately?

Thanks in advance!

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
user961826
  • 564
  • 6
  • 14

2 Answers2

1

You should consider using a parent repo which would be checked out in source/ by buildbot.
Except that parent repo would reference all your other repos as submodules.
And when a submodule is checked out within a parent repo, it will be checked out in its own (repo1, repo2, ...) directory.

You just need to adjust buildbot Git parameters in order to take into accounts submodules.

submodules

(optional): when initializing/updating a Git repository, this decides whether or not buildbot should consider git submodules.
Default: False.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
1

With buildbot 0.8.5 and above, you can use the new master-side source steps (which live at buildbot.steps.source.git.Git instead of builbot.steps.source.Git) and then Git(..., mode='full', ...) will do a checkout plus git clean -xfd.

Also, there is work under way to properly support for using code for multiple sources, that will be included in buildbot 0.8.7, when it is released.

Tom Prince
  • 682
  • 3
  • 9