[Buildbot-devel] Create collection of build steps

Mateusz Loskot mateusz at loskot.net
Fri Sep 29 02:33:31 UTC 2006


Roy S. Rapoport wrote:
> On Fri, Sep 29, 2006 at 12:30:12AM +0200, Mateusz Loskot wrote:
>> Could anyone explain me how to gain collection of re-usable build steps?
> 
> Here's how we do it here.  
> [...] 
>
> cmds = stepObject.steps()
> 
> for cmd in cmds:
>     [desc, cmdStringOrList] = cmd
>     cmdArgs = cmdStringOrList
>     if type(cmdStringOrList) == type(""):
>         cmdArgs = cmdStringOrList.split()
>     newFactory.addStep(step.ShellCommand,
>         name = desc,
>         description = desc,
>         descriptionDone = desc,
>         command = cmdArgs,
>         timeout=1800,
>         haltOnFailure = 1,
> 		)
> 
> Does this make any sense?

Yes, it does but the idea is slightly different from mine.
Here, the assumption is that all commands use the same set of steps,
and the 'for cmd in cmds' loop adds them in in the same order.

I think I'll be able to customize your snippets according to my needs.

Big Thanks!

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




More information about the devel mailing list