4
Jenkins集成Gitlab实现代码自动化交付测试部署
source link: https://chegva.com/1201.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
持续集成实战六——Jenkins集成Gitlab实现代码自动化交付测试部署
Jenkins集成Gitlab实现代码自动化交付测试部署
1.通过构建Execute shell执行shell脚本实现自动化代码部署
[root@linux-node1 ~]# egrep "jenkins|requiretty" /etc/sudoers #Defaults requiretty #注掉,不开tty # changed in order to be able to use sudo without a tty. See requiretty above. jenkins ALL=(ALL) NOPASSWD: /usr/bin/ssh #给jenkins授予相关权限 [root@linux-node1 ~]# ssh [email protected] #使用www用户执行部署脚本,事先要做好免密钥登陆 Last login: Tue Oct 4 05:55:06 2016
2.配置Gitlab钩子脚本
2.1 首先安装Gitlab Hook plugin和Build Authorization Token Root Plugin(用于认证管理)插件,然后按下图配置
当前发布的项目版本
3.git push触发钩子实现代码自动化测试部署
版本已经变更
●由此可见持续集成是否能真正发挥大作用,自动化测试很关键!实战到此告一段落,赶快去试试吧!
安志合个人博客,版权所有 丨 如未注明,均为原创 丨 转载请注明转自:https://chegva.com/1201.html | ☆★★每天进步一点点,加油!★★☆ |
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK