I have created a dynamic text-box though Active choices Reactive reference parameter. I want to parse the content that user enters in this dynamic textbox to the build section of the Jenkins.
Below is what I have done till now
When the User selects "City" as input a textbox populates as shown below
Below is the groovy script used to populate the dynamic input box
if (Country.equals("City")) {
html=
'''<!DOCTYPE HTML>
<input type = "text"
id = "myText"
/>
</p>
</html>
'''
return html
}
else
{
return ["Invalid"]
}
I want to parse the content "Delhi" to build section of Jenkins.I have tried ${path} or $path, $html, $id but it is not accessible.
Can someone please help?
Finally got the solution
Code snippet
if (Country.equals("city")) {
html=
'''
<p>
<input type = "text" id = "myText" name="value" >
</p>
<hr>
'''
return html
}
else
{
return ["Invalid"]
}
The value passed in the text box path can be directly parsed as $path in the execute shell option.