I'm in a somewhat old Hudson configuration. We have an in house developed plugin that query a Nexus repository and set some job parameters. The plugin is in Java.
We also use the depreacated SetEnv Plugin, where we set a bunch of environment variables.
Our plugin, basically extends the ParameterDefinition class to give a bunch of options in the build job screen, then a ParameterValue class set environment variables for our jobs.
Our Parameter Definition classe:
class NexusQueryParameterDefinition extends ParameterDefinition
Is it possible to access the environment variables defined in the SetEnv plugin from our Parameter Definition class?
The problem that I'm at definition time of a a parametrized build, that is the screen between when I press the button "build now" and when I press the button "Build" to start the process. At this point I don't know how to access the job instance object and I believe the build object just will be created when the form is submitted.
These environment variables are persisted in the config.xml
, so if I can read this file I can parse the values.