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

Regression: Variables set in generateEnv are unset by the SECOND envInject


    • Similar Issues:


      Effective in 2.1.5 (and possibly earlier) the behaviour of multiple invocations of envInject has changed.  We are experiencing a regression issue in multiple jobs.

      It appears that the second invocation of envInject "undoes" the settings laid down in the previous invocation, but only for values that we set in GenerateEnv.  Prior to this, settings were additive, and in fact, they are for values that are NOT in the generate step.

      For example : 

      Generate : 
        (works, subsequent steps see VAR=A)

      EnvInject : 
       (works, subsequent steps see VAR1=B VAR2=C)

      EnvInject :
         (fails, subsequent steps see VAR1=A, VAR2=C, VAR3=D)


      Taking a guess, and assuming that the system keeps a list of variables to playback at the beginning of each step, it feels like the env playback is adding the base env settings from generate before each envInject, 
      > GenList+Inject1
      > GenList+Inject1+GenList+Inject2
      > GenList+Inject1+GenList+Inject2+GenList+Inject3

      and the effect is that settings in Inject1 that overrode GenList will only work after the first inject. 


      We are seeing this behaviour in multiple builds after upgrading to 2.73 Jenkins and 2.1.5 envInject



          Issue Links


            tbridges Tony Bridges created issue -
            oleg_nenashev Oleg Nenashev made changes -
            Field Original Value New Value
            Assignee Oleg Nenashev [ oleg_nenashev ]
            oleg_nenashev Oleg Nenashev made changes -
            Link This issue duplicates JENKINS-47370 [ JENKINS-47370 ]
            towens Trey Owens made changes -
            Link This issue is duplicated by JENKINS-53213 [ JENKINS-53213 ]


              • Assignee:
                tbridges Tony Bridges
              • Votes:
                0 Vote for this issue
                2 Start watching this issue


                • Created: