The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.
For a list of other such plugins, see the Pipeline Steps Reference page.
keepEnv: Keep only specified environment variablesnode {
env.CUSTOM=test
env.INFO=useful
keepEnv(['INFO']) {
// at this point the CUSTOM will not be available
bat 'echo %INFO%'
}
}
See the documentation for the env singleton for more information on environment variables.
variables : Array / List of String
PATH will be reset to their default value.
Please submit your feedback about this page through this quick form.
Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?
See existing feedback here.