To answer my own question, this works for iterating across a map in a groovy workflow:
def nodes = [:]
nodes['alpha'] = [
'OPT': 'alpha',
]
nodes['beta'] = [
'OPT': 'beta',
]
def nodelist = nodes.keySet().toList()
def paramnodes = [:]
def nodename = null
for (int i = 0; i < nodelist.size(); i++) {
nodename = nodelist[i]
paramnodes[nodename] = {
node() {
build job: 'parameterized-build-job'
}
}
}
parallel paramnodes
Where I'm going with this is that I'm trying to get it to invoke a single parameterized job multiple times, with different parameters (I've left that part of the workflow out, here -- at the moment it just tells me I called that job multiple times and runs it with one of those sets of parameters, so it's not particularly useful). If you're doing something else and need to iterate across a map in a workflow, perhaps this part of it will be useful to you.
--Andrew