多选择值选项詹金斯 [英] Multi select values options jenkins

查看:171
本文介绍了多选择值选项詹金斯的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个作业,其中我必须为一个参数选择多个值. env:dev1,dev2,qa1,qa2等 我希望能够选择dev1& dev2更新某些值. Jenkins是否有一种方法/插件来处理它?<​​/p>

I am trying to create a job where I have to select multiple values for one parameter. env: dev1, dev2, qa1, qa2 etc I want to be able to select dev1 & dev2 to update certain values. Is there a way/plugin for Jenkins to handle it?

推荐答案

扩展选择参数插件是满足这种要求的方法.您需要从下拉列表中选择Extended Choice Parameter,如下所示:

Extended Choice Parameter plugin is the way to go for such requirement. You need to select Extended Choice Parameter from the drop-down list as shown below:

Name文本框中,指定一个名称.例如,环境.这是您将用来访问触发生成时选择的所有值(dev1,dev2,...)的名称.现在,在Simple Parameter Types部分,您将看到另一个名为Parameter Type的下拉列表.从该下拉列表中选择Multi Select.现在,在Choose Source for Value部分的Value框中输入值(dev1,dev2,qa1,qa2,...).逗号(,)是默认的定界符.请参见下面的屏幕截图:

In Name text-box, assign a name. For example, Environment. This is the name with which you will be accessing all the values (dev1,dev2,...) that you will select while triggering the build. Now, in Simple Parameter Types section, you will see another drop-down with the name Parameter Type. Select Multi Select from that drop-down. Now, in Choose Source for Value section, enter the values (dev1,dev2,qa1,qa2,...) in Value box. Comma (,) is the default delimiter. Refer screenshot below:

完成上述设置后,您将必须访问脚本中的所选选项(使用如上所述的分配给Name的变量)并确定操作步骤.

Once you are done with the above settings, you will then have to access the selected option in your script (using variable assigned to Name as described above) and decide the course of action.

这篇关于多选择值选项詹金斯的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆