0

In a Jenkins Pipeline, I have 3 parameters.

1) SELECTION (Choice or Active Choices or Any choice param type)
- Upload File. (This option points to the parameter: UPLOAD_FILE)
- Enter the file Content directly. (This option points to the parameter: FILE_CONTENT)

2) UPLOAD_FILE - Based on the SELECTION Parameter, this file parameter has to be displayed or enabled.

3) FILE_CONTENT - Based on the SELECTION Parameter, this multi string parameter has to be displayed or enabled.

How to implement this type of scenario. I don't think this could be done using Active Choices Parameter Plugin.

Is this possible by any other plugin or other way?

Thanks in Advance! Looking forward for the answers.... :)

  • This kind of thing _is_ possible with ActiveChoice, but in order to get there you need to write code in Groovy that returns JavaScript for the browser to display. In JavaScript, you can alter visibility of fields as you like. I don't have an example I can share, sorry about that. – MaratC May 19 '20 at 07:35
  • 1
    Active Choice Reactive Reference parameter will do what you are looking for. https://wiki.jenkins.io/display/JENKINS/Reactive+Reference+Dynamic+Parameter+Controls – hdhruna May 19 '20 at 08:44
  • I have similar use case. Did you get the answer ? – Sandeep Lade Feb 11 '22 at 07:26
  • @hdhruna : i am aware of the plugin. But the link doesnt explain how to get file upload option – Sandeep Lade Feb 11 '22 at 07:27

0 Answers0