2

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.

Chris Huang-Leaver
  • 6,059
  • 6
  • 41
  • 67

2 Answers2

4

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.

ILYA Khlopotov
  • 705
  • 3
  • 5
2

The default for flunkOnFailure is False in BuildStep. Various subclasses override this default, in particular ShellCommand. I would guess that the particular steps that are red, with the final result of the build being green, don't have flunkOnFailure set.

On the other hand, it could be that haltOnFailure isn't set, so other steps are running and succeeding, but that the overall result of the build is still failure. The steps that succeed will still be green, even if they follow a failing step. In particular, the body of the waterfall page doesn't indicate whether a particular build succeeded or failed, overall (although the boxes along the top indicate the result of the most recent build. Either the grid or recent-build page will show the results of builds clearly.

Tom Prince
  • 682
  • 3
  • 9
  • Is there any documentation about the per-step defaults or do you have to read the source code? In the latter case which files? – MarcH Apr 03 '13 at 17:03