PATH environment not set in launcher in SimpleBuildStep

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

PATH environment not set in launcher in SimpleBuildStep

Christian Pontesegger
Hi everyone,

I am trying to write a simple plugin that launches an Eclipse instance
on a slave. Therefore java needs to be registered in the PATH
environment variable.

My plugin looks like this:

MyStep extends Builder implements SimpleBuildStep {
...
  perform(Run<?,?> run, FilePath workspace, Launcher launcher,
TaskListener listener) {

    launcher.launch.cmds(...)
  }
}

Problem is that the Environment variables defined in the slave
Configuration/Node Properties do not seem to be available to my launch.

I tried to add envs from run.getEnvironment(listener) but that gives me
only the env variables globally defined in Jenkins, not the ones from
the specific slave.

How can I access the slave environment variables and make them
available to my launch?

I am using Jenkins 2.249.1

thanks a lot
Christian

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/a8b24c19-98fa-47c1-a5ba-a292facd6f5an%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: PATH environment not set in launcher in SimpleBuildStep

Jesse Glick-4
You need to switch to overriding the new `perform` overload. JENKINS-29144

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr3Mqyd-Q%2BcweK1ofwjj%3DTD8VdYE%3DaYhSEbtF-1Fb9GozA%40mail.gmail.com.