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