How to change the default value of Global Environment Variable through build job configuration at run time?

46 views
Skip to first unread message

Kul Bhushan Srivastava

unread,
Nov 18, 2016, 12:46:36 PM11/18/16
to Jenkins Developers
How to change the default value of Global Environment Variable through build job configuration at run time?

Kul Bhushan Srivastava

unread,
Nov 21, 2016, 8:06:07 AM11/21/16
to Jenkins Developers
Can anybody suggest. How to do it?

I tried to do it other way as well. I set a system environment variable through 'Execute Windows Batch' build step. The variable got set successfully. But it is not available in the next step unless I restart the jenkins server.

Please help.

Oleg Nenashev

unread,
Nov 26, 2016, 2:02:33 AM11/26/16
to Jenkins Developers
I think System Groovy script would be the best solution since they allow the access to Jenkins binary API. It should be used with care, but AFAIK it is the only way for such "exotic" use-cases

See Groovy plugin and Scriptler plugin.

понедельник, 21 ноября 2016 г., 16:06:07 UTC+3 пользователь Kul Bhushan Srivastava написал:
Reply all
Reply to author
Forward
0 new messages