title: Jenkins groovy build step trigger another job in groovy script removes original job's parameters
body: <p>I'm using a groovy script to trigger other jobs, which is based on the example from the <a href="https://wiki.jenkins-ci.org/display/JENKINS/Groovy+plugin" rel="noreferrer">Groovy plugin</a> page.</p>
  
  <p>I get a list of jobs as a parameter, validate they exist and trigger them with a few parameters. See main trigger code:</p>
  
  <pre><code>    // Prepare parameters array
      def params = 
      [
          new StringParameterValue('PARAM1', 'val1'),
          new StringParameterValue('PARAM2', 'val2'),
      ]
      def future = job.scheduleBuild2(0, new Cause.UpstreamCause(build), new ParametersAction(params))
      println "Waiting for the completion of " + jobLink
      anotherBuild = future.get()
  </code></pre>
  
  <p>My triggered jobs run perfectly, but with one <strong>major</strong> problem. Their original parameters are lost and are replaced by the new ones <strong>PARAM1</strong> and <strong>PARAM2</strong>.</p>
  
  <p>How to I trigger a job and <strong>add</strong> to its default parameters and <strong>not replace</strong> them?</p>
  
  <p>I tried hard to find a solution for it and didn't find one...</p>
  
  <p><strong>EDIT:</strong> I was thinking of not setting parameters (and allowing job to use its defaults), but setting environment variables for the job's execution. Does anyone have an idea or example on how to do this?</p>