How to update environment variable value via EnvInject plugin

16 views
Skip to first unread message

Quang Truong

unread,
Sep 28, 2015, 8:09:51 AM9/28/15
to Jenkins Users
Hi,

I'm using EnvInject plugin to pass the variables across jobs but in one job the value of one variable might change within that job and I want to update that variable's value within that job.

I have tried to add:
echo var1=%new value%>>"%workspace%\glob.prop"
then use EnvInject this glob.prop into the Environment variable.

However, within the job, the value is still the old one, but after the job finishes, the new value is updated within the environment variables list of that build. Not sure how to update the value right away so I can use that value.

PS: when I write out the glob.prop it has 2 line of the same variable
var1=old value
var1=new value

Thanks,
Quang
Reply all
Reply to author
Forward
0 new messages