Before start

To enable Gitlab-CI, you need to install runners, it is an external service to help build your project. Make sure network between Gitlab server and runner is accessible.

Install

  1. Download gitlab-runner.exe to a folder, ex:C:\GitLab-Runner
  2. Run Command prompt(Administrator):

    1
    gitlab-runner.exe register
  3. Enter URL and token from Project > settings > CI/CD > Runners settings, choose executor as shell.

  4. After register succeed, run

    1
    2
    gitlab-runner install
    gitlab-runner start
  5. Go to Project > settings > CI/CD > Runners settings again, you should find your runner here

  6. Start using the runner by creating first .gitlab-ci.yml in your project root folder

Update

  1. Stop service:

    1
    2
    cd C:\GitLab-Runner
    gitlab-runner stop
  2. Download the newest binary and replace current gitlab-runner.exe.

  3. Start service:

    1
    gitlab-runner start

Uninstall

Command prompt (Administrator):

1
2
3
4
5
cd C:\GitLab-Runner
gitlab-runner stop
gitlab-runner uninstall
cd ..
rmdir /s GitLab-Runner

Reference

https://docs.gitlab.com/runner/