Laufer

GitLab

Run GitLab CI jobs on Laufer: connect with a token, then add a tag to the job.

Token

Create it under Your project → Settings → Access tokens (or your user's Personal access tokens).

Scopes create_runner, read_api and manage_runner. Optional: api. From: A Maintainer of the project, or above.

read_api lets the token read everything its user can see through the API; create_runner and manage_runner let it create and remove runners. With these three, Laufer checks each enabled project for jobs every 1 minute. Adding api lets Laufer add a webhook, so jobs start sooner, but api gives full read and write access to the API as the token's user.

To limit what the token reaches: use a project access token where your GitLab offers one; it reaches only its project. A personal access token reaches everything its user can.

Laufer stores it encrypted. Sign in, paste it with your instance's address, then tick the repositories to use.

CI change

Change one line in .gitlab-ci.yml:

.gitlab-ci.yml
-    tags: [docker]+    tags: [laufer]

For 4 vCPU, use tags: [laufer-4cpu].

Tags

tagsMachinePer minute
laufer2 vCPU, 8 GB€0.0030
laufer-4cpu4 vCPU, 16 GB€0.0050

A job is Laufer's only if all its tags are ours, of one size. A job that also names another, such as docker, is ignored.

Environment

The job runs in a container, alpine:3.20 unless it names an image:. Containers are privileged, so the job has root on its machine. For Docker builds use the docker:dind service:

build:
  tags: [laufer]
  image: docker:cli
  services: [docker:dind]
  variables:
    DOCKER_HOST: tcp://docker:2375
    DOCKER_TLS_CERTDIR: ""
  script:
    - docker build -t myimage .

Cache

Use the cache: block. Nothing to configure, not charged for. Keyed on the lock file:

test:
  tags: [laufer]
  image: node:22
  cache:
    key:
      files: [package-lock.json]
    paths: [.npm/]
  script:
    - npm ci --cache .npm --prefer-offline
    - npm test

Each repository has one cache for protected branches and tags and one for everything else; an unprotected branch cannot read or change the protected one.

Fork pull requests

A fork's pipeline runs in the fork's own project, so it never reaches your Laufer runners.

Waiting jobs

If CI/CD is off for a project, Laufer cannot see its jobs. Its connection page says so. The reasons a job waits are the same for all three.