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
”
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
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: *
)
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
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
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
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.
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') {