title: How to store the previous parameters values in a Jenkins Pipeline?
body: <p>In jenkins 2.73.1, I have a pipeline job written in groovy with two String parameters: <code>ReleaseVersion</code> and <code>NextDevelopmentVersion</code>.</p>
  
  <p>I want to simplify the use of the job by storing / updating the current job parameters values at the end of the script so that they will be the next default values for the next build.</p>
  
  <p>Example:<br>
  User enter the following values for the current build:<br></p>
  
  <pre><code>ReleaseVersion = 1.2.3
  NextDevelopmentVersion = 1.2.4-SNAPSHOT
  </code></pre>
  
  <p>I want to update the job default value so that the next build will display<br></p>
  
  <pre><code>ReleaseVersion = 1.2.4
  NextDevelopmentVersion = 1.2.5-SNAPSHOT
  </code></pre>
  
  <p>Is that possible?
  How to do that in groovy?</p>
  
  <p>I found this question <a href="https://stackoverflow.com/questions/17585615/how-to-store-last-value-of-parameter-in-parameterized-job-as-a-default-value-for">how to store last value of parameter in parameterized job as a default value for?</a> but could not make it work.</p>