Jenkins ::动态字符串参数 [英] Jenkins :: Dynamic String Parameter
问题描述
我有一个带有一个Choice参数param1
和一个带有默认值的常规String参数param2
的参数化项目.
我想知道如何根据param1
选择动态更改param2
的默认值吗?
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?
我听说过 Active Choices插件,它看起来不错,但由于漏洞问题,该插件在Jenkins更新中心不再可用...
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...
有什么等效的东西吗?
谢谢!
推荐答案
我没有其他选择. Active Choices插件取决于
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:
- 主动选择插件:获取 https://repo.jenkins-ci.org/releases/org/biouno/uno-choice/(Jenkins项目Maven存储库)和 2.9 hpi 来自 https://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/scriptler/2.9/和
- 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.
- 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".
这篇关于Jenkins ::动态字符串参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!