Christian Pontesegger
unread,Jan 28, 2021, 1:41:37 AM1/28/21Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Jenkins Developers
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