What do you mean it fails? You mean it only does it on the first node? Might be known issue, IIRC. There's been report in the past that someList.forEach() would only process the fist element. That sounds related.
2015-04-10 18:34 GMT+02:00 Anshu Arya <[email protected]>: > I want to use a list of nodes to launch a command on specific nodes, so I > tried this: > > for (node_name in all_nodes) { > node(node_name) { > echo 'My name is ' + node_name > } > } > > This works for the first node in "all_nodes" but then fails after that. > Is there a better way to do this? > > -- > 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/3895e5f1-866e-4c6b-aef8-8b4a7f942347%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-users/3895e5f1-866e-4c6b-aef8-8b4a7f942347%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Baptiste <Batmat> MATHUS - http://batmat.net Sauvez un arbre, Mangez un castor ! -- 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/CANWgJS6Y4Ajf3K12hP%3DBC-9K-MO8HTb0RHRRDueNegKBJnLHkg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
