I'm running the Jenkins Build Flow Plugin with the following script:
def builds = [:]
[1,2].each {
builds[it] = { build("test", parm: ("$it")) }
}
parallel builds
However, whilst the hash (builds[it]) gets populated correctly, the parm is always null. I've also tried the following:
builds[it] = { build("test", parm: $it)) }
builds[it] = { build("test", parm: it)) }
But the it is always null.
Can anyone give me any pointers as to how I can use the $it, or any other variable in the build jobs please.