title: Jenkinsfile : Run a task in all Agents with same label
body: <p>I want to run a purticular task in the Jenkins pipeline in all Agents with same label. I got below code for this purpose. But it is not working as expected.
  It only runs in the first slave with label "my_label" and then exit. I need to run the job on all Jenkins Slaves with this label.</p>
  
  <p>Any help would be highly appreciated. </p>
  
  <pre class="lang-css prettyprint-override"><code>def labels=["my_label"] def builders=[:] for (x in labels) {
    def label=x builders[label]= {
      node(label) {
        // build steps that should happen on all nodes go here
        // Step 4
        stage('Run deployment on all agents in the given environment') {
          sh "echo Run deployment" sh "echo release_version = ${params.release_version}" sh "echo environment = ${params.environment}"
        }
      }
    }
  }
  
  parallel builders
  </code></pre>
  
  <p>Thanks,
  Arun S</p>