Access Environment variables

32 views
Skip to first unread message

Thilina Madhusanka

unread,
Oct 29, 2015, 5:52:38 AM10/29/15
to Jenkins Developers
Hi

Is there a way to access jenkins env variables via a plugin ? 

take input like ${BUILD_NUMBER}  to a plugin via test input box? 

thanks

Ullrich Hafner

unread,
Oct 29, 2015, 6:44:06 AM10/29/15
to jenkin...@googlegroups.com
--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/535f94c2-85c1-46b3-9cf4-6a7054a05146%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

signature.asc

Thilina Madhusanka

unread,
Oct 29, 2015, 6:53:11 AM10/29/15
to Jenkins Developers
Hi

thanks for the reply 

this  is what i need to do. 

i need to save a report that generate from a plugin with user given env variable append to report file name. 

user need to input file name any string but when user input string with env variable  

for example id user enter report name as reportname-${BUILD_NUMBER} 
is there a way to directly convert this env variable in to the value? 

or i have to check it and then call get method to get value for that env variable and append it to report name? 

thanks

Ullrich Hafner

unread,
Oct 29, 2015, 6:57:37 AM10/29/15
to jenkin...@googlegroups.com
signature.asc

domi

unread,
Oct 29, 2015, 6:59:50 AM10/29/15
to Jenkins Developers
or use the token-macro plugin - it also expands environment variables:
/Domi


Reply all
Reply to author
Forward
0 new messages