需要安装Active Choices插件,官网地址: https://plugins.jenkins.io/uno-choice/
安装完插件以后会出现Active Choices选项:
第一个参数:
return ["dubbo-op-all-deployment1",
"dubbo-op-all-deployment2",
"dubbo-op-all-deployment3"]
第二个参数:
if (Deployment_name.equals("dubbo-op-all-deployment1")){
return ["service-dubbo-op-all"]
}else if (Deployment_name.equals("dubbo-op-all-deployment2")){
return ["service-dubbo-op-al2"]
}else if (Deployment_name.equals("dubbo-op-all-deployment3")){
return ["service-dubbo-op-al3"]
}
效果就是选择第一个自动跳出第二个: