Search code examples
pythonlinuxbuildbot

Why is buildbot *NOT* failing when it should?


I'm trying to fix a very complex buildbot base build system, which has the annoying habit of showing green bars with 'failed (1)' in them.

The problem is that we run several commands using the ShellCommand build step, which is not failing the whole build when it returns non zero.

We also have steps which do show up red on the detail page, but the whole build still shows green.

As far as know 'flunkOnFailure' is not set on the steps themselves in my master.cfg, and the default is true. (Although that's not entirely clear from the manual pages I have found)

What do I need to do ( or undo ) to ensure that an entire build fails when a ShellCommand does?

This is running on 100% Linux environment.

Many thanks.


Solution

  • When you add step to a factory (i.e. f.addStep(your_step)) you should specify haltOnFailure = True to make whole build fail whenever particular build step returns FAILURE.