码迷,mamicode.com
首页 > 其他好文 > 详细

Jenkins多选项框使用

时间:2019-01-11 16:03:16      阅读:238      评论:0      收藏:0      [点我收藏+]

标签:com   info   done   分享   img   jenkins   业务逻辑   col   ice   

多选框的使用场景还是挺多的,比如发布多个服务,或者选择哪些服务器

技术分享图片

想要使用多选项,则需要安装插件extend choice parameter,然后在项目中配置参数化构建过程

技术分享图片

配置完上面,我们就可以在业务逻辑中使用services这个变量了

# 进行过滤操作
services=$(echo $services | sed -r s/"//g)
services=$(echo $services| sed -r s/,/ /g)

#进行循环操作
for service in ${services}
do
    echo $service
done

 

Jenkins多选项框使用

标签:com   info   done   分享   img   jenkins   业务逻辑   col   ice   

原文地址:https://www.cnblogs.com/sellsa/p/10255268.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!