I would like to pre-populate Jenkins Parameter with a Build Variable using the Dynamic Parameter Plug-In.
I added a Groovy script under the Scriptler section of Jenkins:
return $JOB_NAME
JOB_NAME is Jenkins Environment Variable obtained from: ~/env-vars.html
And then added a "Dynamic Parameter (Scriptler)" as below:
However when clicking "Build with Parameters" I don't see the value populated.
I'm totally new to this and not sure if this is the right way to achieve it. Thanks in advance for the help.