<div dir="ltr">Hi Francesco,<div><br></div><div>In order to implement that you will need to create a custom step using the "new style form"</div><div>untested example follows:</div><div><br></div><div><div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;line-height:18px;white-space:pre"><div><span style="color:rgb(86,156,214)">class</span> <span style="color:rgb(78,201,176)">AddRuntimeSteps</span>(<span style="color:rgb(78,201,176)">BuildStep</span>):</div><div> <span style="color:rgb(86,156,214)">def</span> <span style="color:rgb(220,220,170)">run</span>(<span style="color:rgb(156,220,254)">self</span>):</div><div> <span style="color:rgb(197,134,192)">for</span> item <span style="color:rgb(86,156,214)">in</span> <span style="color:rgb(86,156,214)">self</span>.getProperty(<span style="color:rgb(206,145,120)">"foo"</span>, <span style="color:rgb(206,145,120)">""</span>).split(<span style="color:rgb(206,145,120)">','</span>):</div><div> <span style="color:rgb(86,156,214)">self</span>.build.addStepsAfterCurrentStep(ShellCommand(<span style="color:rgb(206,145,120)">"echo "</span> + item))</div><div> <span style="color:rgb(197,134,192)">return</span> SUCCESS</div><div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jan 16, 2018 at 3:55 PM Francesco Di Mizio <<a href="mailto:francescodimizio@gmail.com">francescodimizio@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hey gents,<div><br></div><div>how do I accomplishing something like this? I'd like to add a block of steps inside a loop.</div><div><br></div><div>In pseudo code:</div><div><br></div><div>for item in utils.Property('foo').split(','):<br> addSteps(bar)</div><div><br></div><div>PS: that wouldnt work obviously :)</div><div><br></div><div>Thanks!</div></div>
_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@buildbot.net" target="_blank">users@buildbot.net</a><br>
<a href="https://lists.buildbot.net/mailman/listinfo/users" rel="noreferrer" target="_blank">https://lists.buildbot.net/mailman/listinfo/users</a></blockquote></div>