title: How to make sure list of parameters are updated before running a Jenkins pipeline?
body: <p>A Jenkins pipeline project is configured to fetch its <code>Jenkinsfile</code> from a Git repo:</p>
  
  <p><a href="https://i.stack.imgur.com/SHxPB.png" rel="noreferrer"><img src="https://i.stack.imgur.com/SHxPB.png" alt="Pipeline Def"></a></p>
  
  <p>If I change the list of parameters, for example, from:</p>
  
  <pre><code>properties([
          parameters([
                  string(name: 'FOO', description: 'Choose foo')
          ])
  ])
  </code></pre>
  
  <p>to:</p>
  
  <pre><code>properties([
          parameters([
                  string(name: 'FOO', description: 'Choose foo'),
                  string(name: 'BAR', description: 'Choose bar')
          ])
  ])
  </code></pre>
  
  <p>And run the build, the first run does not show the newly added <code>BAR</code> parameter:</p>
  
  <p><a href="https://i.stack.imgur.com/DNsq4.png" rel="noreferrer"><img src="https://i.stack.imgur.com/DNsq4.png" alt="Parameter list not updated"></a></p>
  
  <p>As the updated Jenkins file expects the <code>BAR</code> parameter to be present, this causes the first build after the change to fail as the user is not presented with an input to enter this value.</p>
  
  <p>Is there a way to prevent this? To make sure the <code>Jenkinsfile</code> is up-to-date before showing the parameter entry page?</p>