title: How to handle parameters of pipeline job in DSL?
body: <p>I have a pipeline job which runs a sequence of jobs (Eg; setup >> run test >> clean). I want this sequence to run for 100 different tool with different parameter for each tool. Parameterising is done. So I can pass different parameter.</p>
  
  <p>I am passing one parameter to pipeline as tool list as a string parameter which will have the tools separated with comma (Eg; tool1, tool2, tool3)</p>
  
  <p>Now I want to change the pipeline to run the same sequence(setup >> run test >> clean) in all the tools with tool name passed to one of the job as parameter.</p>
  
  <p>I was thinking I will take this parameter value and spit it with comma and get each tool name and have a for loop around the sequence.</p>
  
  <p>I could get having forloop part and it is working for a multiple run. </p>
  
  <pre><code>for (int i = 0; i &lt; 2; ++i) {
      stage('Setup') {
          build job: 'setup', parameters: [string(name: 'tool', value:'&lt;tool&gt;')]
      }
      stage('Build') {
          build 'Build Job'
      }
  }
  </code></pre>
  
  <p>But I am not getting how can we split the parameter and give one one to each iteration of forloop in DSL. Can anybody help on this?</p>