您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

jenkins管道中的Active Choices反应参考参数

jenkins管道中的Active Choices反应参考参数

而不是我在下面做的使用 ,它工作正常!

node('slave') {
    def choice1
    def choice2

    stage ('Select'){
        choice1 = input( id: 'userInput', message: 'Select your choice', parameters: [ [\$class: 'ChoiceParameterDeFinition', choices: 'aa\nbb', description: '', name: ''] ])
        if(choice1.equals("aa")){
            choice2 = input( id: 'userInput', message: 'Select your choice', parameters: [ [\$class: 'ChoiceParameterDeFinition', choices: 'yy\nww', description: '', name: ''] ])
        }else{
            choice2 = input( id: 'userInput', message: 'Select your choice', parameters: [ [\$class: 'ChoiceParameterDeFinition', choices: 'gg\nkk', description: '', name: ''] ])
        }
    }
}
其他 2022/1/1 18:18:28 有477人围观

撰写回答


你尚未登录,登录后可以

和开发者交流问题的细节

关注并接收问题和回答的更新提醒

参与内容的编辑和改进,让解决方法与时俱进

请先登录

推荐问题


联系我
置顶