Hi Michael,

Here's how I do it in one of my plugin's Builders:

build.addAction(new EnvironmentContributingAction() {
  public void buildEnvVars(AbstractBuild<?, ?> build, EnvVars envVars) {
    if (envVars != null) {
      envVars.put("ANDROID_HOME", sdkRoot);
    }
  }

  // Other methods return null...
});

All the other build steps can then use that environment variable.

Regards,
Chris


On 30/10/12 14:10, Michael Hüttermann wrote:
Hello,

could you please give me a pointer what the recommended way is to set
environment variables in hudson.tasks.Builder#perform, which are in turn
read in a later build step inside the same job?


Thank you.


Cheers
Michael


Reply via email to