如何在詹金斯文件中传递多选择值参数(Groovy) [英] How to pass multi select value parameter in Jenkins file(Groovy)
本文介绍了如何在詹金斯文件中传递多选择值参数(Groovy)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
例如下面的代码用于单个选择值
E.g. Below code is used for single select value
choice{
choices: 'Box\nOneDrive\nSharePointOnline\nGmail\nGDrive\nGenericS3',
defaultValue: 'box',
description: 'Connector to build',
name: 'On_Cloud_Devices_To_Test'
}
推荐答案
我会使用booleanParam.然后,用户可以勾选所有必需的选项.
I would use booleanParam's. Then the user can tick all the required options.
booleanParam(defaultValue: false, name: 'ALL', description: 'Process all'),
booleanParam(defaultValue: false, name: 'OPTION_1', description: 'Process option 1'),
booleanParam(defaultValue: false, name: 'OPTION_2', description: 'Process options 2'),
这篇关于如何在詹金斯文件中传递多选择值参数(Groovy)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文