菜单 学习猿地 - LMONKEY

VIP

开通学习猿地VIP

尊享10项VIP特权 持续新增

知识通关挑战

打卡带练!告别无效练习

接私单赚外块

VIP优先接,累计金额超百万

学习猿地私房课免费学

大厂实战课仅对VIP开放

你的一对一导师

每月可免费咨询大牛30次

领取更多软件工程师实用特权

入驻
257
0

gitlab-runner的安装

原创
05/13 14:22
阅读数 81388

地址:https://docs.gitlab.com/runner/install/linux-manually.html
Simply download one of the binaries for your system:

下载安装 包

Linux x86-64

sudo curl -L --output /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-amd64

Linux x86

sudo curl -L --output /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-386

Linux arm

sudo curl -L --output /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-arm

Linux arm64

sudo curl -L --output /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-arm64

You can download a binary for every available version as described in Bleeding Edge - download any other tagged release.

获取执行权限

Give it permissions to execute:

sudo chmod +x /usr/local/bin/gitlab-runner

建立用户

Create a GitLab CI user:

sudo useradd --comment 'GitLab Runner' --create-home gitlab-runner --shell /bin/bash

安装服务和启动

Install and run as service:

sudo gitlab-runner install --user=gitlab-runner --working-directory=/home/gitlab-runner
sudo gitlab-runner start

注册runner到gitlab

https://docs.gitlab.com/runner/register/index.html

  1. Run the following command:

sudo gitlab-runner register

  1. Enter your GitLab instance URL:

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

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

Please enter the gitlab-ci token for this runner
xxx

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

Please enter the gitlab-ci description for this runner
[hostname] my-runner

Enter the tags associated with the Runner, you can change this later in GitLab’s UI:

  1. Please enter the gitlab-ci tags for this runner (comma separated):
    my-tag,another-tag

  2. Enter the Runner executor:

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

  1. 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.6):
alpine:latest

发表评论

0/200
257 点赞
0 评论
收藏
为你推荐 换一批