On Wednesday, April 1, 2015 at 12:55:37 PM UTC-4, Kent Johnson wrote:
>
> I think I could just echo "$env.BUILD_NUMBER" for those who are
>> wondering. I didn't test doing so though I am sure it would work.
>
>
Either:
echo env.BUILD_NUMBER
or
echo "${env.BUILD_NUMBER}"
(Not sure whether Groovy gives higher precedence to `$` or `.` so play it
safe and use braces if inside a GString.)
BTW as of the 1.5 release, the live documentation (i.e., Snippet Generator)
for environment variable handling has been consolidated into the help for
the new withEnv step, which seemed the most appropriate place for it.
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/50f098d7-3580-4b5a-9a89-78dbb1adeb43%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.