[Buildbot-devel] Conceptual problem with custom build steps

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


I just realized that I mis-typed the variable name in my example of start()
here.  In reality the name of the variable in the
self._buildMasterCommand.execute() does match the name of the variable in
__init__()

On Fri, Feb 13, 2009 at 2:42 PM, Ian Peters-Campbell <mahatmamanic at gmail.com
> wrote:

> 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/8d326483/attachment.html>


More information about the devel mailing list