GitLab Runner on Uberspace

23.09.2017: Updated instructions for 10.0.x release of GitLab Runner.

This post describes how to setup gitlab-runner on an Uberspace using the shell executor.

Download gitlab-runner-linux-amd64

Download the Runner binary into the ~/bin  directory and make it executable:

Create a working directory for the Runner:

Get configuration details for the Runner

In your GitLab project navigate to Settings > CI/CD Pipelines. Find the URL for the runner setup and the registration token as shown in the picture below:

Register the Runner

Provide the configuration details when asked and make sure to choose shell as executor:

Create a daemon to start the Runner

Create a daemon to start your GitLab Runner automatically on reboot and have it supervised. See https://wiki.uberspace.de/system:daemontools for reference.

First, setup your service directory:

Create a script called gitlab-ci  inside your ~/bin  directory. Note the exec command which prevents spawning a new process and allows the daemontools to fully control the Runner:

Make the script executable:

Activate the daemon:

For details on how to manage a daemon see https://wiki.uberspace.de/system:daemontools#wenn_der_daemon_laeuft

That’s it!

Your GitLab Runner should now be ready to process your builds if your project is configured correctly. See https://docs.gitlab.com/ce/ci/ for reference.

This entry was posted in git. Bookmark the permalink.