[users at bb.net] iterating through a property's value?

Francesco Di Mizio francescodimizio at gmail.com
Tue Jan 16 16:45:05 UTC 2018


Works like charm. Thank Pierre :)

On Tue, Jan 16, 2018 at 4:35 PM, Pierre Tardy <tardyp at gmail.com> wrote:

> Hi Francesco,
>
> In order to implement that you will need to create a custom step using the
> "new style form"
> untested example follows:
>
> class AddRuntimeSteps(BuildStep):
> def run(self):
> for item in self.getProperty("foo", "").split(','):
> self.build.addStepsAfterCurrentStep(ShellCommand("echo " + item))
> return SUCCESS
>
> On Tue, Jan 16, 2018 at 3:55 PM Francesco Di Mizio <
> francescodimizio at gmail.com> wrote:
>
>> Hey gents,
>>
>> how do I accomplishing something like this? I'd like to add a block of
>> steps inside a loop.
>>
>> In pseudo code:
>>
>> for item in utils.Property('foo').split(','):
>>     addSteps(bar)
>>
>> PS: that wouldnt work obviously :)
>>
>> Thanks!
>> _______________________________________________
>> users mailing list
>> users at buildbot.net
>> https://lists.buildbot.net/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildbot.net/pipermail/users/attachments/20180116/d1473e7e/attachment.html>


More information about the users mailing list