title: Dynamic Parameter in Jenkinsfile?
body: <p>How can I use the <a href="https://github.com/jenkinsci/dynamicparameter-plugin" rel="noreferrer">Jenkins Dynamic Plugin</a> in a <code>Jenkinsfile</code>?</p>
  
  <p>What I am looking for is a Jenkinsfile snippet that:</p>
  
  <ul>
  <li>Enables the <code>Build with Parameters</code> option in the Jenkins job</li>
  <li>When selected, a script that populates a list that can be used <code>Dynamic Choice Parameters</code> is populated and the user will see a drop down list.</li>
  </ul>
  
  <p>When trying:</p>
  
  <ol>
  <li><code>Pipeline syntax</code> in the Jenkins editor</li>
  <li>Selecting <code>properties: Set job properties</code> as <code>Sample step</code></li>
  <li>Selecting <code>This project is parameterized</code></li>
  <li>Using <code>Dynamic Choice Parameter</code></li>
  <li>Enter values for <code>Name</code>, <code>Choice Script</code>, <code>Remote Script</code> etc</li>
  <li><code>Generate Pipeline Script</code></li>
  </ol>
  
  <p>I get the following template:</p>
  
  <pre><code>properties([
      parameters([
          &lt;object of type com.seitenbau.jenkins.plugins.dynamicparameter.ChoiceParameterDefinition&gt;
      ]), 
      pipelineTriggers([])
  ])
  </code></pre>
  
  <p>i.e. the generated pipeline script does not contain the data that I have entered in step <code>5.</code> above. How can I modify <code>parameters</code> so that parameter name, choices, etc will be visible to the user?</p>
  
  <hr>
  
  <p>Jenkins version: 2.19.3
  Dynamic Parameter Plugin version: 0.2.0</p>