脚本化Jenkins文件-运行中的多选

脚本化Jenkins文件-运行中的多选,jenkins,jenkins-pipeline,jenkins-groovy,Jenkins,Jenkins Pipeline,Jenkins Groovy,我有一个脚本化管道,如下所示: node(){ stage("test"){ echo "test" } stage("two"){ deployOptions = "one\ntwo\nthree\nfour\nfive" def userInput = input( id: 'userInput', message: 'pick option', parameters: [ [$class: 'ChoicePa

我有一个脚本化管道,如下所示:

node(){
  stage("test"){
    echo "test"
  }
  stage("two"){
      deployOptions = "one\ntwo\nthree\nfour\nfive"

      def userInput = input(
        id: 'userInput', message: 'pick option', parameters: [
          [$class: 'ChoiceParameterDefinition', choices: deployOptions, description: 'Select deployment', name: 'deploy-pick']
      ])
    echo "you selected: ${userInput}"
  }
  stage("deploy"){
    echo "deploy"
  }
}
第一阶段打印“测试”,第二阶段等待用户选择
列表([1,2,3,4,5])
,在用户选择选项之后,管道运行“部署”阶段


但我现在想要的不是从deployOptions列表中选择一个选项,而是能够选择多个选项(如预构建参数中的extendedChoice)。

不管怎样,我解决了它

我使用了
“com.cwctravel.hudson.plugins.extended\u choice\u参数.ExtendedChoiceParameterDefinition”