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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.