Editable Choice plugin is a Getting started
You can use Editable Choice in your job just like built-in choice paraemters:
pipeline { agent any parameters { editableChoice( name: 'PARAM1', choices: ['Apple', 'Grape', 'Orange'], ) } stages { stage('build') { steps { echo "PARAM1=${params.PARAM1}" } } } }
You can enter a parameter value in a build page:
Build page
You can also configure it for GUI-based jobs like freestyle projects:
Job configuration
Full pipeline example:
editableChoice( name: 'PARAM1', description: 'Choose your favorite fruit', choices: ['Apple', 'Grape', 'Orange'], defaultValue: 'Grape', restrict: true, filterConfig: filterConfig(prefix: true, caseInsensitive: true), )
| parameter | type | required | description |
|---|---|---|---|
name |
string |
yes |
The name of the parameter |
description |
string |
The description for the parameter |
|
choices |
list of strings |
yes |
Choices |
defaultValue |
string |
The initial value. Uses the top most value if not specified. |
|
restrict |
boolean |
Restrict the input value to be a value in choices. Otherwise, you cannot submit the build. |
|
filterConfig |
filterConfig |
Display only choices matching with current input. The choice behaves like suggestions. |
parameters for filterConfig:
| parameter | type | required | description |
|---|---|---|---|
prefix |
boolean |
Match the input only with prefix of choices |
|
caseInsensitive |
boolean |
Match in case insensitive |
Report issues and enhancements in the Changelog
Licensed under MIT, see LICENSE.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。