Gitlab

CI & CD

.gitlab-ci.yml

Runner

  • Install GitLab Runner using the official GitLab repositories | GitLab

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

    apt-cache madison gitlab-runner
    sudo apt-get install gitlab-runner=10.8.0
  • Registering Runners | GitLab

    1
    2
    3
    4
    5
    6
    7
    8
    9
    sudo gitlab-runner register \
    --non-interactive \
    --url "http://gitlab.lyloou.com/" \
    --registration-token "xxxxxxxxxxxxx" \
    --executor "shell" \
    --description "shell-runner" \
    --tag-list "shell" \
    --run-untagged="true" \
    --locked="false"

-【GITLAB】 服务配置可持续集成部署的项目案例 - 安装篇 - 个人文章 - SegmentFault 思否

1
2
3
4
sudo gitlab-runner list
gitlab-runner unregister --url http://gitlab.example.com/ --token t0k3n
gitlab-runner unregister --name test-runner
gitlab-runner unregister --all-runners

!!#ff0000

Runner的大版本号要和gitlab的在版本号保持一致。
如:Runner 10.8.0 ~ gitlab 10.2.4