jenkins 如何从一个有源选择无功参数引用到另一个有源选择无功参数?

daolsyd0  于 12个月前  发布在  Jenkins
关注(0)|答案(1)|浏览(138)

在上面的图片中,我使用了Active choice参数来选择团队。使用Active choiceReact参数,我使用“Team”作为参考参数来获得针对CSCase的活动选择。同样,我想使用一个积极的选择React参数的蓝图要选择的基础上Usecase选定。从一个有源选择无功参数到另一个无功选择参数是否有路径参考?

ltqd579y

ltqd579y1#

看起来你可以使用CascadeChoiceParameter,像这样:

[
        $class: 'CascadeChoiceParameter',
        choiceType: 'PT_SINGLE_SELECT',
        description: 'Blueprint',
        name: 'Blueprint',
        omitValueField: true,
        filterLength: 1,
        filterable: false,
        referencedParameters: 'UseCase',
        randomName: "choice-parameter-${randomNumber}",
        script: [
            $class: 'GroovyScript',
            fallbackScript: [
                classpath: [],
                sandbox: true,
                script: """return [Error]"""
            ],
            script: [
                classpath: [],
                sandbox: true,
                script: """
                    if () { return [bla] }
                    """
            ]
        ]
    ]

相关问题