On Wed, Aug 8, 2018 at 9:26 PM Trevor Howard <[email protected]> wrote:
> update EnvVars post setup but before disposal?
No it is not possible with `SimpleBuildWrapper`. `Context.getEnv` is
called once when the body is entered.
A Pipeline step could define an `EnvironmentExpander` which is
consulted whenever a nested step calls
`StepContext.get(EnvVars.class)`. This would happen, for example, when
a `sh` step starts. Of course that is useless if your step happens to
be something like
sh '''
make world
# two hours later…
aws s3 cp a.out s3://mybucket/binary
'''
since by the time the `aws` binary is run, the token has expired, even
though it was valid when `make` started.
> private static class DisposeEnvironment extends Disposer {
> private static final long serialVersionUID = 1;
> private final Thread thread;
This attempt is in any event impossible as a `Thread` is not `Serializable`.
--
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/CANfRfr1%3DBDc7J23vgwL1BgS%2BOrJfYtArsa1vbBGCWUxbeFdjpg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.