gitlab runner

Table of Contents
  1. 在执行 pipeline 上机器上安装 gitlab runner
# Download the binary for your system
sudo curl -L --output /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-amd64

# Give it permission to execute
sudo chmod +x /usr/local/bin/gitlab-runner

# Create a GitLab Runner user
sudo useradd --comment 'GitLab Runner' --create-home gitlab-runner --shell /bin/bash

# Install and run as a service
sudo gitlab-runner install --user=gitlab-runner --working-directory=/home/gitlab-runner
sudo gitlab-runner start
  1. 在项目的设置中添加 gitlab runner , 并在作为 runner 的机器上运行
gitlab-runner register  --url http://xxxxxx  --token xxxxxx

runner 的 execitpr 可以先选择 shell , 运行之后会生成一个配置文件 ~/.gitlab-runner/config.toml"

大致的流程如下

file

Comments |0|

Legend *) Required fields are marked
**) You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
Category: Uncategorized