On Wed, Nov 2, 2016 at 4:48 PM, Jimmy Ray <[email protected]> wrote:
> final EnvVars environment = build.getEnvironment(listener); ...
> environment.addLine(String.format("%s=%s", key, value));

Makes no sense. The result of `getEnvironment` is immutable—a new map
each time you call it.

If you have a block-scoped Pipeline `Step`, the equivalent of
`SimpleBuildWrapper.Context.env` would be to use
`EnvironmentExpander`. See `EnvStep` for a simple example.

There is intentionally no way to set build-wide variables, only within
a block scope.

-- 
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/CANfRfr2MnOWC9NApPH7n6s9fW7r%2BgLb%2B1SS60shCmnOMGPDV_A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to