Skip to content

Gitlab Runner Integration

To properly use the Digital Twins Preview Page, you need to configure at least one project runner in your GitLab profile. The first step is to configure the CI/CD pipeline in gitlab project. The second step is to install the runner and integrate it with the selected gitlab project.

Configure Gitlab Project

Follow the steps below:

  1. Navigate to the DTaaS group and select the project named after your GitLab username.
  2. In the project menu, go to Settings and select CI/CD.
  3. Expand the Runners section and click on New project runner. Follow the configuration instructions carefully:
  4. Add linux as a tag during configuration.
  5. Click on Create runner. A runner authentication token is generated. This token will be used later for registering a runner.

Runner

Install Runner

A detailed guide on installation of gitlab runners on Linux OS is available on gitlab website. Remember to use linux as tag for the runner.

Register Runner

Please see this gitlab guide on registering a runner.

Remember to choose docker as executor and ruby:2.7 as the default docker image.

$sudo gitlab-runner register  --url https://gitlab.foo.com \
  --token xxxxx

Or, you can also register the runner in non-interactive mode by running

1
2
3
4
5
6
7
$sudo gitlab-runner register \
  --non-interactive \
  --url "https://gitlab.foo.com/" \
  --token "xxxx" \
  --executor "docker" \
  --docker-image ruby:2.7 \
  --description "docker-runner"

Start Runner

You can manually verify that the runner is available to pick up jobs by running the following command:

$sudo gitlab-runner run

It can also be used to reactivate offline runners during subsequent sessions.

Pipeline Trigger Token

You also need to create a pipeline trigger token. This token is required to trigger pipelines by using the API. You can create this token in your GitLab project's CI/CD settings under the Pipeline trigger tokens section.