Samba CI on gitlab/Under the hood

From SambaWiki
Revision as of 20:52, 12 February 2019 by Abartlet (talk | contribs) (.gitlab-ci-private.yml vs .gitlab-ci.yml)

Jump to: navigation, search

How GitLab CI works at a High Level

Running remote scripts, displaying the output

Like the Samba build farm of old, GitLab CI is best seen as a system for running scripts on remote hosts against a git checkout.

In Samba's case, the remote script is plus some housekeeping before and after. The details is recorded in the .gitlab-ci-private

.gitlab-ci-private.yml vs .gitlab-ci.yml

We have two different CI configurations, one using the default name .gitlab-ci.yml (so picked up by default by forks of our repo) and one that we specify in the Common development repo (.gitlab-ci-private.yml)

The .gitlab-ci-private.yml file includes .gitlab-ci.yml to as to avoid duplication.

The motivation here is to use the shared runners where possible as these are provided by at no cost to Samba Team.

Wrapping docker

To get a consistent build environment docker images are used, so the scripts runs in a docker container. The image used is defined in the .gitlab-ci.yml file.

On a private VM

To allow us to accept and test code from a broader range of contributors, and to enable scaling at times of peak load, the docker container is started in a private VM using Docker Machine]. This applies for both the private and shared (provided by runners.