Re: How can I inject environment variables into my groovy class?

2017-12-04 Thread red 888
e same way System.getEnv() doesn’t work, doing that > will not behave as expected either (Assuming the sandbox will let you) > > > > > > Regards, > > Daniel. > > > > *From: *red 888 > *Sent: *29 November 2017 20:28 > *To: *Jenkins Users > *Subject: *R

RE: How can I inject environment variables into my groovy class?

2017-12-03 Thread Daniel Butler
” and then you’ve got all the environment variables setup and you’re in a standard groovy environment without the pipeline restrictions and idiosyncrasies. From: red 888 Sent: 03 December 2017 00:28 To: Jenkins Users Subject: Re: How can I inject environment variables into my groovy class

Re: How can I inject environment variables into my groovy class?

2017-12-02 Thread red 888
u’ve got a direct execution of a process commented out, > don’t do that either. The same way System.getEnv() doesn’t work, doing that > will not behave as expected either (Assuming the sandbox will let you) > > > > > > Regards, > > Daniel. > > > > *From: *

RE: How can I inject environment variables into my groovy class?

2017-12-01 Thread Daniel Butler
) Regards, Daniel. From: red 888 Sent: 29 November 2017 20:28 To: Jenkins Users Subject: Re: How can I inject environment variables into my groovy class? So this is a problem for me because the APIs I'm using in the groovy class are looking for OS level environment variables. Is there any way

Re: How can I inject environment variables into my groovy class?

2017-11-29 Thread red 888
So this is a problem for me because the APIs I'm using in the groovy class are looking for OS level environment variables. Is there any way to set these variables with jenkins? On Tuesday, November 28, 2017 at 5:54:37 PM UTC-5, mpapo - Michael Pailloncy wrote: > > Pipeline environment

Re: How can I inject environment variables into my groovy class?

2017-11-28 Thread Michael Pailloncy
Pipeline environment variables are not stored at the OS level. That's why you are not able to get them using *System.getenv() *(which only list OS level environment variables). But you should be able to retrieve them like any other classical environment variables : with the "${MyVar}" syntax

Re: How can I inject environment variables into my groovy class?

2017-11-28 Thread Victor Martinez
Just wondering whether using the previous thread: https://groups.google.com/forum/#!topic/jenkinsci-users/XbI9WjlLmFY/discussion might help to keep a history of the previous suggestions though -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group.

How can I inject environment variables into my groovy class?

2017-11-28 Thread red 888
My pipeline is using the environment directive to set an environment var and then calls a groovy class: def call(int blah) { pipeline { agent any environment { MyVar = credentials('djsjflsjfljsf') } stages { stage('Stage ONE') {