Skip to content

Gitlab Runner

GitLab Runner is an application that works with GitLab CI/CD to run jobs in a pipeline.

Tu Graz Repository has a Gitlab group invenio. That has a group runner Gitlab-Runner-03-Produktion-Invenio-Shell, which is provided by ZID.

We are using this group runner to run our Pipeline jobs, from gitlab to our VM server's.

How the GitLab runners are registered?

  1. Access the node - for example: ssh then enter your password from sesam.tugraz to gain access to the server.
  2. Add GitLab’s official repository.

    curl -L | sudo bash

  3. install the gitlab-runner

    apt install gitlab-runner

  4. Register the gitlab-runner for your group runner.

    gitlab-runner register

    Input Value
    gitlab-ci URL:
    gitlab-ci token: Check sesam.tugraz
    gitlab-ci description: invenio01-prod
    gitlab-ci tags: prod-one
    executor: shell
  5. Make sure to give permission.

    usermod -aG docker gitlab-runner.

Runner is registered successfully. Now you should be able to see your Gitlab-runner in the list here.

Possible Errors

These error might apear when using this registered runner for the first time.

The runner throws an ERROR

ERROR: Job failed (system failure): prepare environment: exit status 1 SEE HERE.

Solution Remove/comment .bash_logout entries.

  • Access your VM server

  • Navigate to /home/gitlab-runner

  • Look for file called .bash_logout

  • Remove or comment the entries on this file

Error saving credentials

Error saving credentials: error storing credentials - err: exit status 1, out: `Cannot autolaunch D-Bus without X11 $DISPLAY

Solution: install package in VM

apt install gnupg2 pass.

To learn more Gitlab-runner commands, visit the GitLab Runner commands.