CID/Gitlab_CI_Primer

Brief Overview of (Gitlab) CI/CD

Gitlab CI is made up of one or more “Runners”, which are simply daemons that can be given instructions to execute jobs defined in .gitlab-ci.yml files, kept in the root of repositories. For more detailed information you can read documentation starting with the Gitlab CI Quickstart.

The most important concepts to grow familiar with are:

Here are some specifics about how we have things configured:

Pipelines

By default, Pipelines are run on every commit, in every branch. This can be altered in the .gitlab-ci.yml file on a per job basis, and can be limited to specific branches in a project or group’s settings on Gitlab.

Merge Requests also trigger ad-hoc pipelines unless disabled in the project/group’s settings.

Executors

An executor defines how and where Gitlab is going to execute the CI job.

Executors we use

We currently use 2 different executors:

  • KVM executor - This boots a Debian 10 VM to run the scripts for each job. We plan to make additional OSes and architectures available to this executor.

  • Docker executor - This allows one to specifiy a given docker image in which to run the scripts from each job.