First, add the Yum source
curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh | sudo bash
Second, installation Gitlab-runner
yum install gitlab-runner -y
Third, configuration Gitlab-runner
向GitLab-CI注册一个Runner需要两样东西:GitLab-CI的url和注册token。其中,token是为了确定你这个Runner是所有工程都能够使用的Shared Runner还是具体某一个工程才能使用的Specific Runner。如果要注册Shared Runner,你需要到管理界面的Runners页面里面去找注册token。[[email protected] cmdb]# gitlab-runner registerRunning in system-mode. Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/):http://gitlab.clife.cn/Please enter the gitlab-ci token for this runner:jmGuf9k2WsssNaxsBGcnJ6TPlease enter the gitlab-ci description for this runner:[dx-cdh3]: share_runnerPlease enter the gitlab-ci tags for this runner (comma separated):Registering runner... succeeded
Iv. add users to the Docker user group if you need to use Docker build service and publish
usermod -a -G docker gitlab-runner
Gitlab-runner Installation