【问题标题】:Using activeChoiceReactiveParam in pipeline在管道中使用 activeChoiceReactiveParam
【发布时间】:2021-05-05 02:35:17
【问题描述】:

如何在 Jenkins 管道中使用activeChoiceReactiveParam?

这是我的 jenkins 文件的相关部分:

 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') {
        ^

【问题讨论】:

标签: jenkins jenkins-pipeline jenkins-groovy


【解决方案1】:

我认为正如 this 帖子所说,管道不支持 activeChoiceParams。

该帖子是 2 年前的,但似乎仍然有效; Active Choices 插件 repo 链接了一个 Jenkins 问题,该问题阻止管道与插件正常工作,他们的 pipeline example 与他们在我链接的帖子中描述的相似。

【讨论】:

    猜你喜欢
    • 2014-11-07
    • 1970-01-01
    • 1970-01-01
    • 2016-06-18
    • 2011-07-16
    • 2023-03-29
    • 2017-06-09
    • 2021-02-05
    • 2015-03-26
    相关资源
    最近更新 更多