0

I have a buildbot setup which is able to checkout code from branch "a" and able to run a bunch of build, test commands on that code. While this works, now I want the code to be merged into branch "b" when all of the steps are successfully finished.

Is there a way in buildbot to do that?

user855
  • 19,048
  • 38
  • 98
  • 162

1 Answers1

0

On all CI systems, there is always the option to drop down to the command line - in buildbot, you can use the ShellCommand for that, e.g.:

f = BuildFactory()
f.addStep(ShellCommand(
              command=['make', 'test'], haltOnFailure=True))
f.addStep(ShellCommand(
              command=['git', 'merge', ...])

haltOnFailure ensures that the merge is only run when the tests have passed.

P.S.: of course, it's enough to use the ShellCommand for the merge step, the prior step(s) can be anything, as the haltOnFailure is a common option to all steps.

zsepi
  • 1,572
  • 10
  • 19