Setting up GitLab CI

In order to use GitLab's CI feature, you will need to set up one additional component: the GitLab CI Runner. While GitLab itself is responsible for managing your application's source code and deciding when to trigger a new CI build, the CI Runner is the component that is responsible for actually executing these jobs. Separating the actual GitLab container from the CI Runner allows you to distribute your CI infrastructure and have, for example, multiple runners on separate machines.

The GitLab CI Runner can also be set up using a Docker image. To set up the CI Runner, run the following command:

$ docker container run --detach \ --name gitlab-runner \ --link gitlab:gitlab \ -v /var/run/docker.sock:/var/run/docker.sock \ ...

Get Cloud Native programming with Golang now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.