Whoops, this is the code:
def parTask = [:]

for(int i = 0; i < all_nodes.size(); i++) {
   def node_name = all_nodes[i]
   parTask[node_name] = {
     node(node_name) {/* stuff to do in parallel across selected nodes */ }
   }
}
parallel parTask



On Monday, July 13, 2015 at 5:19:57 PM UTC-7, Anshu Arya wrote:
>
> The workaround right now is to just use normal C-style loops. For example 
> if you want to do stuff in parallel:
>
> def parTask = [:]
>
> for(int i = 0; i < all_nodes.size(); i++) {
>
>    def node_name = all_nodes[i]
>    parTask[node_name] = { /* stuff to do in parallel */ }
>
> }
> parallel parTask
>
>
> On Monday, July 13, 2015 at 5:02:01 PM UTC-7, Owen B. Mehegan wrote:
>>
>> I'm trying to accomplish basically the same thing - I have identical 
>> steps that I want to run on >1 slave, in parallel. Is there any other 
>> succinct way to write this? Right now I am duplicating everything for each 
>> slave, which should offend anyone's sense of programming decency :)
>>
>> Being able to write:
>> node('linux_slave', 'windows_slave') {
>>   // some steps to run in parallel on both slaves
>> }
>>
>> would be fantastic.
>>
>> On Tuesday, June 16, 2015 at 12:38:13 PM UTC-7, Jesse Glick wrote:
>>>
>>> On Monday, April 27, 2015 at 11:18:09 PM UTC-4, Anshu Arya wrote:
>>>>
>>>> java.io.NotSerializableException: java.util.AbstractList$Itr
>>>>
>>>
>>> JENKINS-27421 <https://issues.jenkins-ci.org/browse/JENKINS-27421> 
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/628a249d-d564-418b-9837-86db4d64ec20%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to