[Buildbot-devel] Create collection of build steps

Mateusz Loskot mateusz at loskot.net
Thu Sep 28 22:30:12 UTC 2006


Hi,

I'd like to create collection of common steps used by number of build
factories. Here is how I'm trying to do it:

s = factory.s

commonSteps = {}

commonSteps["cvs"] = s(step.CVS,
        name="cvs",
        cvsroot = myRoot,
        cvsmodule = myModule,
        mode="update")

commonSteps["make"] = s(step.ShellCommand,
        name="make",
        description=["compiling"],
        descriptionDone=["compile"],
        command=["make"])

Next, I'm adding these steps in appropriate order to different
factories:

f1 = factory.BuildFactory
f1.addStep(commonSteps["cvs"])
f1.addStep(commonSteps["make"])
...

f2 = factory.BuildFactory
f2.addStep(commonSteps["cvs"])
f2.addStep(commonSteps["make"])
...

When I launch build (Force Build) I get following error (pasted
important part):

error while creating step, factory=(<class buildbot.process.step.CVS
...

and

...
 File
"/buildbot/usr/lib/python2.4/site-packages/buildbot/process/base.py",
line 359, in setupBuild
            step = factory(build=self, **args)
        exceptions.TypeError: 'tuple' object is not callable


But if I add build step directly, everything works well:

f1.addStep(step.CVS,
        name="cvs",
        cvsroot = myRoot,
        cvsmodule = myModule,
        mode="update")


I don't understand where is the difference. As I understand,
in examples factory.s() function should return appropriate structure.

Could anyone explain me how to gain collection of re-usable build steps?

Cheers
-- 
Mateusz Loskot
http://mateusz.loskot.net




More information about the devel mailing list