Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/jenkins/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sockets/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jenkins 如何将多个参数打包到输入指令中?_Jenkins - Fatal编程技术网

Jenkins 如何将多个参数打包到输入指令中?

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: '

下面是描述我在Jenkins(Jenkins 2.265)中尝试做什么的代码片段。但詹金斯夫妇抱怨说:

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}"