Conditional build parameter

9 views
Skip to first unread message

Danny Wong

unread,
Feb 14, 2017, 1:33:26 AM2/14/17
to jenkins...@googlegroups.com

Hi All,

            Is there a way in Jenkins where if I have 2 radio buttons (yes/no) as a build parameter. if the user selects “yes”, then a dropdown will display and gets populated with data. If no, the dropdown disappears from the UI? Is there a way to implement this? Thanks!




______________________________________________________________________

The contents of this electronic message, including any attachments, are intended only for the use of the individual or entity to which they are addressed and may contain confidential information. If you are not the intended recipient, you are hereby notified that any use, dissemination, distribution, or copying of this message or any attachment is strictly prohibited. If you have received this transmission in error, please send an e-mail to postm...@whitehatsec.com and delete this message, along with any attachments, from your computer.

Maciej Jaros

unread,
Feb 14, 2017, 8:19:47 AM2/14/17
to jenkins...@googlegroups.com
Danny Wong (2017-02-14 07:33):

Hi All,

            Is there a way in Jenkins where if I have 2 radio buttons (yes/no) as a build parameter. if the user selects “yes”, then a dropdown will display and gets populated with data. If no, the dropdown disappears from the UI? Is there a way to implement this? Thanks!


There is no built-in way to do that. But you can vote fore a feature request here:
https://issues.jenkins-ci.org/browse/JENKINS-19002

There is also a bit hacky script that allows to do what you are asking for:
https://github.com/Eccenux/jenkins-scripts/blob/master/theme/nux-js/parameter-grouping.js

Regards,
Nux.
Reply all
Reply to author
Forward
0 new messages