您好,登錄后才能下訂單哦!
GNU / Linux 安裝gitlab-runner:
其安裝在與安裝GitLab的位置不同的服務(wù)器上
1.下載gitlab-runner二進(jìn)制可執(zhí)行源文件 x86-64
sudo wget -O /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-amd64
2.給源文件可執(zhí)行權(quán)限
sudo chmod +x /usr/local/bin/gitlab-runner
3.創(chuàng)建一個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
安裝時可指定腳本執(zhí)行用戶和gitlab-runner工作目錄
sudo gitlab-runner start
通過GitLab的界面獲取共享或特定Runner的令牌和gitlab服務(wù)器域名
(進(jìn)入gitlab項(xiàng)目->設(shè)置->CI/CD->Runners->Setup a specific Runner manually)
1.注冊
sudo gitlab-runner register
2.根據(jù)提示輸入相關(guān)配置
Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com )
https://gitlab.com(輸入GitLab實(shí)例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標(biāo)簽 可在gitlab的UI頁面修改)
Please enter the executor: ssh, docker+machine, docker-ssh+machine, kubernetes, docker, parallels, virtualbox, docker-ssh, shell:
shell(輸入runner腳本執(zhí)行環(huán)境)
注冊成功后在gitlab的此項(xiàng)目的
設(shè)置->CI/CD->Runners頁面會出現(xiàn)一個新的runner tag標(biāo)簽為剛才輸入的tag標(biāo)簽內(nèi)容
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。