Hello,
I have a massive QB installation and there are 2 resources that interest us: MSVS2013 and TOOLS.
There are over 20 hosts that have these 2 resources and they take part in compiling many QB configs. However, just 1 of these configs is experiencing a problem with most of the servers. This is why I thought, I should alter the problematic config in a way it would exclude known faulty hosts while the rest are unaffected. Normally I would create an extra attribute on these 20 machines and set it to a different value on hosts that are faulty for this 1 config, but due to the amount of hosts, I thought it would be a better use of my time to make the config discriminate against known faulty hosts in a Groovy script.
So, the node selection process involves "on node on which the script evaluates to true" with such script:
${groovy:
def localhost = node.getHostName()
def bad_hosts = ["ALPHA", "BETA", "DELTA", "GAMMA", "PHI", "ZETA", "OMEGA"]
for(i = 0; i < bad_hosts.length; ++i) {
if(localhost == bad_hosts[i]) return false
}
return true
}
However, running the config with such a script for selecting proper compile hosts ended up in QB skipping this step entirely.
What did I do wrong here?