[users at bb.net] iterating through a property's value?
Pierre Tardy
tardyp at gmail.com
Tue Jan 16 15:35:24 UTC 2018
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/7a28324f/attachment.html>
More information about the users
mailing list