Jenkins 如何将多个参数打包到输入指令中?
下面是描述我在Jenkins(Jenkins 2.265)中尝试做什么的代码片段。但詹金斯夫妇抱怨说:Jenkins 如何将多个参数打包到输入指令中?,jenkins,Jenkins,下面是描述我在Jenkins(Jenkins 2.265)中尝试做什么的代码片段。但詹金斯夫妇抱怨说: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: 81: unexpected token: choice @ line 81, column 34. choice( name: '
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
WorkflowScript: 81: unexpected token: choice @ line 81, column 34.
choice( name: 'TestU2',
^
1 error
我希望单输入指令返回多项选择。这可能吗
steps
{
script
{
env.TestResult = input message: 'Test Pass?', ok: 'Done',
parameters:
[
choice( name: 'TestU1',
choices: 'Pass\nFail' )
choice( name: 'TestU2',
choices: 'Pass\nFail' )
choice( name: 'TestU3',
choices: 'Pass\nFail' )
choice( name: 'TestU4',
choices: 'Pass\nFail' )
choice( name: 'TestResult',
choices: 'Yes\nNo' )
]
echo "${TestU1}, ${TestU2}, ${TestU3}, ${TestU4}, ${TestResult}"