首页 > 其他 > 详细

gitlab CI/CD

时间:2021-05-07 10:20:34      阅读:22      评论:0      收藏:0      [点我收藏+]

gitlab CI/CD架构:

技术分享图片

 

 gitlab CI/CD步骤:

技术分享图片

安装Runner:

Linux服务器安装:

?Linux安装文档:https://docs.gitlab.com/runner/install/linux-repository.html

curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh | sudo bash

yum install gitlab-runner

Docker服务器安装:

?docker安装文档:https://docs.gitlab.com/runner/install/docker.html

docker run -d --name gitlab-runner --restart always -v /srv/gitlab-runner/config:/etc/gitlab-runner -v /var/run/docker.sock:/var/run/docker.sock --add-host=gitlab.ctnrs.com:192.168.121.132 gitlab/gitlab-runner:latest

 注册Runner:

登录容器:

 docker exec -it gitlab-runner bash

免交互注册,注意,token要 用root用户登录,单击管理中心-》概览-》runner,复制里面的token:

 gitlab-runner register --non-interactive --executor "shell" --url "http://gitlab.ctnrs.com" --registration-token "b3xFBYvysadqGz-eF4Ly" --description "test1" --tag-list "build,deploy" --run-untagged="true" --locked="false"

注册成功能看到生成一个runner:

技术分享图片

 

gitlab CI/CD

原文:https://www.cnblogs.com/jamespeng/p/14737514.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!