Jenkins :: Dynamic String Parameter

℡╲_俬逩灬. 提交于 2019-12-25 09:26:01

问题


I have a parameterized project with one Choice Parameter param1 and a regular String Parameter param2 with a default value. I would like to know how to dynamically change the default value of param2 according to param1 selection?

I heard about Active Choices Plugin and it looks good but the plugin is no longer available in the Jenkins update center because of vulnerability issue...

Is there something equivalent ?

Thanks!


回答1:


I haven't seen any alternative. The Active Choices Plugin depends on the Scriptler Plugin, which was pulled for security reasons. You can, at your own risk, still install and use these plugins, ignoring the security concerns (see top of the Scriptler Plugin page), by bypassing the update center like this:

  1. Active Choices Plugin: Get the 1.5.3 hpi from https://repo.jenkins-ci.org/releases/org/biouno/uno-choice/ (the Jenkins project Maven repository) and upload it to jenkins per the advanced plugin installation instructions.
  2. Scriptler Plugin: Get the 2.9 hpi from https://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/scriptler/2.9/ and upload it to jenkins per the advanced plugin installation instructions.

This info was had from the comments at the bottom of the Active Choices Plugin page. I suspect any updates or announcements of a new secure version will land there first, though there is also this closed "bug".



来源:https://stackoverflow.com/questions/44357736/jenkins-dynamic-string-parameter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!