Ubuntu18.04 GitLab仓库服务器搭建:
https://blog.csdn.net/EthanCo/article/details/82828097?spm=1001.2101.3001.6650.3&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-4.essearch_pc_relevant&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-4.essearch_pc_relevant
gitlab的root密码重置:
https://blog.csdn.net/Myuhua/article/details/99879422#commentBox
https://blog.csdn.net/HYZX_9987/article/details/119929043
docker安装:
https://www.cnblogs.com/ellisonzhang/p/13902451.html
配置 Jenkins 自动拉取 gitlab 中的代码并部署:
https://blog.csdn.net/lee_yanyi/article/details/116235292#t7
使用jenkins构建报错:ERROR: Couldn’t find any revision to build. Verify the repository and branch configuration for this job:
https://www.cnblogs.com/Durant0420/p/13852188.html
邮件配置:
参考1:https://www.jianshu.com/p/2ff1731cf5fb
参考2:https://blog.51cto.com/liqingbiao/2449306
Jenkins成功与失败的判断:
Jenkins是通过错误代码来判断是否成功或失败,0或者true代表执行成功,非0代表执行失败,在书写测试用例时,我们可以根据这个让Jenkins来做出测试结果的判定。
通过以上的步骤完成了:
- 搭建gitlab,上传测试脚本
- 搭建docker环境,创建jenkins镜像
- Jenkins中创建job,每次build都会自动从gitlab上拉取最新的代码
- 执行后,通过return的true或false来输出结果,发送邮件