Accessing EnvVars across plugins

5 views
Skip to first unread message

Jordan Vogel

unread,
Jun 5, 2019, 1:02:17 PM6/5/19
to Jenkins Developers
Hey, so I am trying to access the variable of the job parameter which comes though the Parameterized Build Jobs plugin. This variable is passed in through the URL of the script that triggers the job. I am writing a custom plugin to have some settings changes based on the parameter the job gets passed in. I, for the life of me, can't seem to access the variable, and I am thinking this is because it is a variable that comes from another plugin, not inherent to jenkins. 

I have tried System.getEnv(EnvVar), and System.getProperty(EnvVar) both to no avail, I have even tried to get an Array of all parameters, all of these return null. 

Does anyone know how this is done? Do I have to change functionality in the Parameterized Build Jobs plugin (not ideal). Or how can I access a job parameter passing in from the above plugin, from a separate plugin?

Thanks
Reply all
Reply to author
Forward
0 new messages