Currenly when we need to run configuration on multiple QB agents (usually in paralel, but not nesisarly), we're doing:
Node Selection using script:
node.getAddress()==params.get("nextMachine")
Repeat Parameters using parameter:
nextMachine = ${vars.getValue("MachineListOnResource")}
Where Variable MachineListOnResource =
${groovy:
import com.pmease.quickbuild.entitymanager.*
import com.pmease.quickbuild.grid.*
import com.pmease.quickbuild.util.*
def resource = ResourceManager.instance.get(vars.getValue("GridResource"));
def nodeAddresses = new ArrayList();
for (node in Grid.instance.getAllNodes()) {
if (resource.getCount(node) > 0)
nodeAddresses.add(node.address);
\}
nodeAddresses.sort();
return StringUtils.join(nodeAddresses);
}
And Variable GridResource = Specified resource that collects all agents by a regular expression (as described here: http://forum.pmease.com/viewtopic.php?f=1&t=2412
This flow is used in many configurations that need to be run on multiple agents, usually agents that being chosen with a regexp.
Can you make a new "Node Selection" option in next QB release, that allows to run step "On ALL Nodes with" Specified Resource, or "On ALL Nodes with" specified script evaluating to true (e.g regex match) ?
Thanks a lot!
Noam.