简体   繁体   English

使用扩展选择参数自动化 Jenkins 作业

[英]Automating Jenkins Job with extended choice parameter

I'm trying to run a jenkins job from bash using cURL.我正在尝试使用 cURL 从 bash 运行 jenkins 作业。

My job includes some string inputs, file inputs and one extended choice parameter input.我的工作包括一些字符串输入、文件输入和一个扩展选择参数输入。

Passing normal string parameters or file parameters works for me fine, but I just don't succeed in adding multiple values for the extended choice parameter input (Extended Choice Parameter - A common plugin in Jenkins allowing to add a list of checkboxes).传递普通字符串参数或文件参数对我来说很好,但我只是没有成功为扩展选择参数输入添加多个值(扩展选择参数 - Jenkins 中的一个通用插件允许添加复选框列表)。

This is what I'm trying now for all of the fields:这就是我现在正在为所有领域尝试的:

curl -X POST [JENKINS_URL]/job/[JOB_NAME]/buildWithParameters \
--form [SOME_PARAMETER]=[ITS_VALUE] \
--form [SOME_PARAMETER]=[ITS_VALUE] \
--form [FILE_PARAMETER]=@[FULL_PATH_TO_FILE]

How can I add the extended choice parameter's values to this request?如何将扩展选择参数的值添加到此请求中?

Tried million different things and none of them worked:(尝试了数百万种不同的东西,但都没有奏效:(

How can I add the extended choice parameter's values to this request?如何将扩展选择参数的值添加到此请求中?

Simply repeat parameter name multiple times with different values:只需使用不同的值多次重复参数名称:

curl -X POST '[JENKINS_URL]/job/[JOB_NAME]/buildWithParameters?extChoiceName=value1&extChoiceName=value2

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM