[workflow-plugin] dynamically select slave nodes from list in for loop

11 views
Skip to first unread message

Anshu Arya

unread,
Apr 10, 2015, 12:37:41 PM4/10/15
to jenkins...@googlegroups.com
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?
Reply all
Reply to author
Forward
0 new messages