Jenkins 在管道中使用ActiveChoicerActiveParam

Jenkins 在管道中使用ActiveChoicerActiveParam,jenkins,jenkins-pipeline,jenkins-groovy,Jenkins,Jenkins Pipeline,Jenkins Groovy,如何在Jenkins管道中使用ActiveChoiceActiveParam 这是我的詹金斯档案的相关部分: parameters{ activeChoiceParam('foo') { description('zzzz') filterable() choiceType('SINGLE_SELECT') groovyScript {

如何在Jenkins管道中使用
ActiveChoiceActiveParam

这是我的詹金斯档案的相关部分:

 parameters{
         activeChoiceParam('foo') {
                description('zzzz')
                filterable() 
                choiceType('SINGLE_SELECT')
                groovyScript {
                    script('xx')
                    fallbackScript('xx')
                }
            }
      }
运行生成时出现此错误:

WorkflowScript: 10: Build parameters definitions cannot have blocks @ line 10, column 6.
        activeChoiceParam('foo') {
        ^
我认为正如post所说,管道不支持activeChoiceParams

该职位是两年前的,但似乎仍然有效;Active Choices plugin repo链接了Jenkins的一个问题,该问题阻碍了管道与该插件的良好工作,其内容与我链接的帖子中描述的内容类似。

希望这能有所帮助