Runners


Runners

Runners are used to execute jobs in GitLab CI

Extensive configuration

Executors interface with infrastructure

Shell

Jobs are executed in the context of the runner


Using containers

Dedicated execution environment per job

Executor talks to infrastructure:

  1. Creates volume for working directory
  2. Run helper container for checkout into volume
  3. Run build container for build using volume

Services are executed in separate containers next to the build container

Docker

Jobs are executed in a dedicated container

Kubernetes

Jobs are executed in a dedicated containers in a pod per pipeline


Runner scopes

Instance runners

Shared across all groups and projects

Reserved for instance administrators

Managed from admin area

Group/project runners

Shared across a group or a project

Accessible to members with Owner role

Shared runners can be disabled


Runner tags

Runners can have tags

Tags specify features based on…

Selecting runners in pipelines

Each can use a different runner:

job_name:
  tags:
  - foo

All features work across different runners


Pro tip: Special purpose executors

May builtin executors

Instance executor (builtin)

On-demand creation of VM

Beta support for AWS

Experimantal support for Azure and GCP

Custom executor

DIY

Examples: libvirt , LXD , AWS Fargate