You access environment variables differently based on the type of job. So,
in the free style Notifier/Recorder/etc you would use
https://javadoc.jenkins-ci.org/hudson/model/Run.html#getEnvironment-hudson.model.TaskListener-.
For pipeline, in your Step implemention, you do what Jesse mentioned:
getContext().get(EnvVars.class).

On Mon, Oct 7, 2019 at 11:09 AM Matthias <[email protected]> wrote:

> I see. But then again I still have the problem with the missing
> environment variables from the groovy script in the builder class or is
> this only an issue for pipelines?
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-dev/8c363905-65c5-4c95-b178-acc30ca736ca%40googlegroups.com
> .
>


-- 
Website: http://earl-of-code.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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAPiUgVdSJieMzDn%2BGS6LUixFtuKFkfDm_%3DxMy_RxBTJ9q0ci2Q%40mail.gmail.com.

Reply via email to