1

Only one gitlab runner is available in my project. However, in the runner page I have multiple other runners listed. How do I add these runners to the project such that a runner will be randomly selected to execute the build? The runners are running in Docker containers and I am using a self-managed version of GitLab.

These are the runners I have available

Only runner1 is currently shown in /settings/cicd under Runners: runner1

Dylan Kapoor
  • 113
  • 1
  • 7

2 Answers2

2

Basically, if you go by runners there are actually three types of a runner in Gitlab

  1. Specific: Only for Specific Project
  2. Group: For all projects in the particular group (if need more info on groups https://docs.gitlab.com/ee/user/group)
  3. Shared: These will be available for every project in the GitLab

It will be difficult to specify here that how we can configure the runners but I can point to documentation from where we actually configured our Runners https://docs.gitlab.com/ee/ci/runners/

Also to make a note of tagging is a very important task that needs to be done so that you can use your runners with your requirement like you said you want to use runners randomly from the list then all the runners in the list should have a common tag that can be further used in your .gitlab-ci.yml file. eg. We have tag runners as per the AWS ec2 instance size so (like macro, small, medium, large, etc) so that people using can use the runners as per the requirement of there job)

job1:
  tags:
    - shared-large-runner

job2:
  tags:
    - shared-micro-runner

Note: you can have multiple tags for a single runner for better control over its usage.

Hopefully, this helps!!

Shri_Automation
  • 191
  • 1
  • 5
0

Looking at your screenshot, to be able to use group runners, your project just need to be inside that group

Because the group tag shows that the runner was configured just to accept jobs from one group

I think you have one runner for each group, this is the reason that your project only have the runner1

Sergio Tanaka
  • 1,325
  • 1
  • 6
  • 18