title: Jenkins Job DSL: Using parameters in groovyScript in job step
body: <p>For my build job "generated-job-1" I need several parameters, which are passed in when the build (of the generated-job-1) is triggered via URL.</p>
  
  <p>Here my Job Definition with parameters inside the SeedJob DSL:</p>
  
  <pre><code>job('generated-job-1'){
  label ('master')
  parameters{
      stringParam('DEPLOY_URI', 'https://192.168.200.176/hyperManager', 'Provide the URL where DeploymentManager can be accessed.')
      stringParam('REG_ID', '12', 'The id of the owner (Registration) of this deployment.')
  }
  steps {
      groovyCommand(readFileFromWorkspace('stepscript.groovy')){
          prop('name', 'value')
          prop('DEPLOY_URI', $DEPLOY_URI)
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>I tried to use DEPLOY_URI, $DEPLOY_URI and ${DEPLOY_URI} and it the build fails with different error messages like
  No such property: DEPLOY_URI for class: javaposse.jobdsl.dsl.helpers.step.GroovyContext</p>
  
  <p>or
  ERROR: (script, line 12) No such property: $DEPLOY_URI for class: javaposse.jobdsl.dsl.helpers.step.GroovyContext</p>
  
  <p>or
  ERROR: (script, line 12) No signature of method: javaposse.jobdsl.dsl.helpers.step.GroovyContext.$() is applicable for argument types: (script$_run_closure1$_closure3$_closure4$_closure5) values: [script$_run_closure1$_closure3$_closure4$_closure5@1a11cf0]</p>
  
  <ol>
  <li>How can I define and pass those parameters to my step-script.groovy?</li>
  <li>How could I use those parameters in other steps, such as shell or batchFile?</li>
  <li>How do I access those parameters in my step-script.groovy, to work with the given data?</li>
  </ol>
  
  <p>I searched for a while now and tried hard to get it working... No success.</p>
  
  <p>Help really appreciated, as I am new to Job DSL and to Groovy.</p>
  
  <p>Thanks in advance,
  Anne</p>