您好,登录后才能下订单哦!
GNU / Linux 安装gitlab-runner:
其安装在与安装GitLab的位置不同的服务器上
1.下载gitlab-runner二进制可执行源文件 x86-64
sudo wget -O /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-amd64
2.给源文件可执行权限
sudo chmod +x /usr/local/bin/gitlab-runner
3.创建一个gitlab-runner用户
sudo useradd --comment 'GitLab Runner' --create-home gitlab-runner --shell /bin/bash
4.安装、启动
sudo gitlab-runner install --user=gitlab-runner --working-directory=/home/gitlab-runner
安装时可指定脚本执行用户和gitlab-runner工作目录
sudo gitlab-runner start
通过GitLab的界面获取共享或特定Runner的令牌和gitlab服务器域名
(进入gitlab项目->设置->CI/CD->Runners->Setup a specific Runner manually)
1.注册
sudo gitlab-runner register
2.根据提示输入相关配置
Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com )
https://gitlab.com(输入GitLab实例URL)
Please enter the gitlab-ci token for this runner
xxx(输入runner注册令牌)
Please enter the gitlab-ci tags for this runner (comma separated):
my-tag(输入runner标签 可在gitlab的UI页面修改)
Please enter the executor: ssh, docker+machine, docker-ssh+machine, kubernetes, docker, parallels, virtualbox, docker-ssh, shell:
shell(输入runner脚本执行环境)
注册成功后在gitlab的此项目的
设置->CI/CD->Runners页面会出现一个新的runner tag标签为刚才输入的tag标签内容
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。