Reputation: 127
Is there a way to get the environment variable value inside a Jenkins Plugin implementation?
Upvotes: 3
Views: 1633
Reputation: 127
Thanks so much Ashish Dhandharia. It solved my problem.
final EnvVars env = build.getEnvironment(listener);
String envVarValue = env.get("ENTER_ENV_VAR_HERE");
Upvotes: 2
Reputation: 361
Are you looking for this?
Variable substitution in Jenkins plugin
Upvotes: 2