[Buildbot-devel] New User & odd/different source requirements

Brian Warner warner-buildbot at lothar.com
Fri Sep 10 19:06:13 UTC 2004


>     I'm currently doing some development for another group of the
> company that I work for and am being hit with changes being made to
> the source that impact the area I'm working in, so I thought I'd see
> about installing something to monitor it.  My primary background's
> Java and I've used tools of this sort there, but the current work's
> C++, so I had a look and BuildBot looked suitable, although I'm
> finding the 1st step a bit higher than I anticipated!

Welcome! Yes, the first step is a doozy. That's slowly getting better (more
docs, more examples) but not as quickly as I'd like.

>     At the moment, I'm simply trying to set up a 1-system build, with
> the intention of simply using raw console commands and having the
> build run periodically, but I'm still trying to work out (or find
> examples of!) things such as the Factories & adding steps.

They're all tied in together, although I'll agree that the easiest place to
start is with a single Builder that just runs a single ShellCommand.

>     One 'feature' here is the ClearCase source control

Fun! Yes, ClearCase presents some special challenges.

> all I was intending to start with was to use the command line steps to set
> my view 'cleartool setview <viewname>'' then issue the (localised) make
> command to run from the view, but even that's looking challenging.

That should be pretty straightforward. I think you may run into some problems
with the way ClearCase likes to own your workspace.. you're treading new
ground here.

>  1) Should I go with the 0.5.0 kit, or pull the CVS HEAD code?

For your purposes I would go with 0.5.0 . You'll be able to get started with
the code and learn how it is all put together without having to fight with
any of the bugs that are undoubtedly in the development branch. The
configuration process isn't quite as clean as it will be in the next release,
but I think it's a reasonable tradeoff.

>  2) If the 0.5.0, can I use Steps in some form or do I need to code a
> BuildFactory extension to have that functionality?

Both:

 A BuildFactory is responsible for creating Builds and populating them with
 Steps.

 When you create the BuildFactory, you tell it what kinds of Steps each Build
 should be given (by giving it a list of (class, args) tuples).

 In 0.5.0, buildbot.process.base.ConfigurableBuildFactory is the base class
 you want to use. The other classes are just attempts to simplify typical
 use cases

Creating a factory that runs 'ct setview NAME' and then 'make all' would look
like this:

 from buildbot.process.base import ConfigurableBuildFactory
 from buildbot.process import step
 steps = [(step.ShellCommand, {'workdir': '.',
                               'command': ['ct', 'setview', 'NAME']}),
          (step.ShellCommand, {'workdir': '.',
                               'command': ['make', 'all']}),
         ]
 f = ConfigurableBuildFactory(steps)



More information about the devel mailing list