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

17 views
Skip to first unread message

Anshu Arya

unread,
Apr 10, 2015, 4:22:56 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