[Buildbot-devel] Conceptual problem with custom build steps

Ian Peters-Campbell mahatmamanic at gmail.com
Fri Feb 13 22:42:54 UTC 2009


I'm running into trouble pretty quickly with my custom build step, and
having a bit of trouble wrapping my head around what I should be doing with
the code.

I need a build step which will first perform an action in the Buildmaster's
shell, then call a shell command on the Buildslave.  To that end, I wrote a
helper class to take care of the action I wanted to take on the Buildmaster
side, and then wrote my build step like so:

class SpecialBuildStep(ShellCommand):
    def __init__(self, buildMasterCommandObject, dir = None, com = None,
desc = None, descDone = None):
        self._buildMasterCommand = buildMasterCommandObject
        ShellCommand.__init__(self, workdir = dir, command = com,
description = desc, descriptionDone = descDone)

    def start(self):
        self._buildMasterCommandObject.execute()
        ShellCommand.start(self)

This, however, is not working.  I get errors (at build execution time) about
SpecialBuildStep not having a _buildMasterCommand attribute.  If I try to
pass the parameters in for the buildMasterCommand and instantiate it within
the SpecialBuildStep, that causes another kind of problem where (at build
execution time again) I am told that there are missing arguments before my
keyword arguments.

It looks like when I first build the buildsteps and put them in the factory
I am actually building a kind of template which is then later instantiated,
which is fine, but it doesn't seem as though some of my parameters are
surviving the transition.  Debug printing shows the values passed in to
SpecialBuildStep.__init__() to be correct when I am building my factories,
but then seem to disappear later at buil time.

What am I doing wrong?

Ian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20090213/7be0849a/attachment.html>


More information about the devel mailing list