gitlab-ci runner

Gitlab-ci runner是Gitlab-ci的運(yùn)行環(huán)境,可以選擇docker部署,也可以選擇服務(wù)器進(jìn)行部署。

Runner分為三種:specific runner、share runner、group runner

specific?runner:個(gè)人runner,只可以自己種,在同一個(gè)項(xiàng)目組的人無法使用。自己通過specific runner的token進(jìn)行創(chuàng)建個(gè)人的runner環(huán)境。

share runner和group runner 都是群組內(nèi)人員共享。所有人都可以用。當(dāng)CI運(yùn)行錯(cuò)誤時(shí),會(huì)給提交人發(fā)送郵件。

Install Runner:

# For Debian/Ubuntu/Mint

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

sudo apt-get install gitlab-runner?

然后進(jìn)行Registering Runner

gitlab-ci

在gitlab-ci的setting中,選擇ci

runner

group runner只有在群組管理員權(quán)限才可以設(shè)置。

在 specific runner下面,會(huì)有runner的url和token。

然后進(jìn)行runner的注冊:

1.Run the following command:

sudo gitlab-runner register

2.Enter your GitLab instance URL:

Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com )

https://gitlab.com

3.Enter the token you obtained to register the Runner:

Please enter the gitlab-ci token for this runner

xxx

4.Enter a description for the Runner, you can change this later in GitLab's UI:

Please enter the gitlab-ci description for this runner

[hostame] my-runner

4.Enter the?tags associated with the Runner, you can change this later in GitLab's UI: tag是用來在.gitlab-ci.yml中去指定用哪一個(gè)runner去運(yùn)行

Please enter the gitlab-ci tags for this runner (comma separated):?

my-tag,another-tag

5.Enter the?Runner executor:

Please enter the executor: ssh, docker+machine, docker-ssh+machine, kubernetes, docker, parallels, virtualbox, docker-ssh, shell:docker

7.If you chose Docker as your executor, you'll be asked for the default image to be used for projects that do not define one in?.gitlab-ci.yml:

Please enter the Docker image (eg. ruby:2.1):

alpine:latest

Runner executor,因?yàn)槲矣胹hell腳本,我只用了shell這一種。

這樣runner就在服務(wù)器裝好了,就可以在配置ci文件中去指定runner運(yùn)行了。

更多參照于官網(wǎng):GitLab Runner | GitLab

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • Preface Quick Start : http://doc.gitlab.com/ce/ci/quick_...
    xiaojianxu閱讀 2,502評(píng)論 0 0
  • 這是阿里內(nèi)網(wǎng)的一篇文章,感有用,故轉(zhuǎn)載來了,自己實(shí)際搭建了,故記錄一下: 背景在日常工作中,我們往往會(huì)搭建基于je...
    新強(qiáng)吖閱讀 6,021評(píng)論 0 4
  • 前言 本文操作目標(biāo):搭建GitLab以及使用GitLab的CI Runner服務(wù),對(duì)項(xiàng)目進(jìn)行測試。操作過一次,才知...
    勤勞一沙鷗閱讀 2,745評(píng)論 1 2
  • Spring Cloud為開發(fā)人員提供了快速構(gòu)建分布式系統(tǒng)中一些常見模式的工具(例如配置管理,服務(wù)發(fā)現(xiàn),斷路器,智...
    卡卡羅2017閱讀 136,506評(píng)論 19 139
  • 購物狂歡節(jié),象征性花了點(diǎn)錢,沒有購物欲望也是件麻煩事,感覺跟這個(gè)世界有點(diǎn)格格不入! 依然在課程里,透過身體動(dòng)作的練...
    兮兮0225閱讀 192評(píng)論 0 0

友情鏈接更多精彩內(nèi)容