搭建gitlab仓库 参考链接 https://about.gitlab.com/install/#centos-7
搭建gitlab-runner 参考链接 https://blog.csdn.net/weiguang1017/article/details/77720778
新建一个maven项目引入docker-maven-plugin插件,如图
image.png
在项目根目录新建.gitlab-ci.yml文件,添加相关相信如图
image.png
提交代码并push到远程仓库,结果如图所示
image.png
可以点击进去查看详情,如图所示
image.png