GNU / Linux 安裝gitlab-runner:
常山ssl適用于網(wǎng)站、小程序/APP、API接口等需要進行數(shù)據(jù)傳輸應(yīng)用場景,ssl證書未來市場廣闊!成為成都創(chuàng)新互聯(lián)的ssl證書銷售渠道,可以享受市場價格4-6折優(yōu)惠!如果有意向歡迎電話聯(lián)系或者加微信:18980820575(備注:SSL證書合作)期待與您的合作!其安裝在與安裝GitLab的位置不同的服務(wù)器上
1.下載gitlab-runner二進制可執(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ù)器域名
(進入gitlab項目->設(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實例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的此項目的
設(shè)置->CI/CD->Runners頁面會出現(xiàn)一個新的runner tag標(biāo)簽為剛才輸入的tag標(biāo)簽內(nèi)容