Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-36225

load step causes changes to parameters to be discarded

      I have a pipeline job which gets some string (choice) parameters.
      along the pipeline I edit one of those strings, and later on load a groovy script file using the load step.

      I noticed that the changes I made to the string hold just until the load step, and after that the variable somehow reverts back to the original value (as chosen when the build was initialized).

      e.g.
      parameter name: SomeParameter
      parameter value: SomeValue

      pipeline script:

      echo SomeParameter
      SomeParameter = SomeParameter - 'Some'
      echo SomeParameter
      load file: 'myscript.groovy'
      echo SomeParameters
      

      output:

      [pipeline] echo
      SomeValue
      [pipeline] echo
      Value
      [pipeline] load
      [pipeline] echo
      SomeValue
      

            jglick Jesse Glick
            itaisanders Itai Sanders
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: