parallel unit.build_nodes
However, I am trying to flexible for some jobs that are memory/cpu intensive and NOT in parallel. I want my library/dsl code to be same and do something like:
if (do_parallel) {
parallel unit.build_nodes
} else {
def keys = unit.build_nodes.keySet() as List
for (s in keys) {
def _node = unit.build_nodes.get(s)
_node(s)
}
}
This works, but I am not getting my nice 'label' that prints out when I run in parallel.
You can see me passing the key (label) with _node(s), but doesn't help.
My build_nodes map is created like examples, something like:
Map<String,Object> build_nodes = [:];
unit.build_nodes['FOO'] = ...
unit.build_nodes['FOO1'] = ...