How to set tags on Gitlab runner instances?
Asked Answered
G

1

9

The documentation specifies how to set tags on the job side so it only runs on runners equipped with the right tags:

osx job:
  stage: build
  tags:
    - osx
  script:
    - echo "Hello, $USER!"

However, I couldn't find how to set these tags on the runner itself. With the previous example, how can I set "osx" as a tag on my runner?

Guacin answered 20/4, 2023 at 8:36 Comment(0)
R
7

You can either set this either when registering the runner:

gitlab-runner register --tag-list "osx,foo,bar" #...

Or you can edit the tags of an already-registered runner using the GitLab UI by clicking the edit icon on the runner list and editing the tag list:

runner edit

Ripon answered 20/4, 2023 at 22:35 Comment(1)
For a group runner, you can find the runner list under Groups -> Build -> RunnersGooseberry

© 2022 - 2024 — McMap. All rights reserved.