yinl_li 发表于 2018-9-19 09:25:20

gitlab-ci自动集成

二:gitlab-runner的安装和使用  
1:安装
  
For Debian/Ubuntu
  
curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-ci-multi-runner/script.deb.sh | sudo bash
  
For RHEL/CentOS
  
curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-ci-multi-runner/script.rpm.sh | sudo bash
  
For Debian/Ubuntu
  
sudo apt-get install gitlab-runner
  
For RHEL/CentOS
  
sudo yum install gitlab-runner
  
参考文档:https://docs.gitlab.com/runner/install/linux-repository.html#installing-the-runner
  

  
运行gitlab-runner,参考文档:https://docs.gitlab.com/runner/register/index.html
  
运行以下命令:
  
sudo gitlab-runner register
  
输入您的GitLab实例网址:
  
Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com )https://10.0.10.50
  
输入您获得的用于注册Runner的令牌:
  
Please enter the gitlab-ci token for this runner 6Rz9bnmtcC8f4jQHwo8q
  
输入Runner的描述,您可以稍后在GitLab的UI中进行更改:
  
Please enter the gitlab-ci description for this runner my-runner
  
输入与Runner关联的标签,您可以稍后在GitLab的UI中进行更改:
  
Please enter the gitlab-ci tags for this runner (comma separated):my-tag,another-tag
  
选择Runner是否应该接收没有标签的作业,您可以稍后在GitLab的UI中进行更改(默认为false):
  
Whether to run untagged jobs :: true
  
选择是否将Runner锁定到当前项目,您可以稍后在GitLab的UI中进行更改。当Runner是特定的(默认为false)时有用:
  
Whether to lock Runner to current project :: false
  
输入Runner执行者:
  
Please enter the executor: ssh, docker+machine, docker-ssh+machine, kubernetes, docker, parallels, virtualbox, docker-ssh, shell:docker
  
2:注册成功后,启动gitlab-runner
  
# gitlab-runner start


页: [1]
查看完整版本: gitlab-ci自动集成