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

Francesco Di Mizio francescodimizio at gmail.com
Tue Jan 16 23:50:09 UTC 2018


Well one each answer is quite a few copies, but one for sure :)

On Tue 16. Jan 2018 at 17:55, Pierre Tardy <tardyp at gmail.com> wrote:

> np, for each answer, I require a copy of the game you are working on :)
>
>
> On Tue, Jan 16, 2018 at 5:45 PM Francesco Di Mizio <
> francescodimizio at gmail.com> wrote:
>
>> 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/138b5a3f/attachment.html>


More information about the users mailing list