Woody
Woody

Reputation: 33

Using one gitlab ci runner for multi group

I have a VM for execute ci runner, and two groups.

The runner is installed for one group. Is there any way to share it to the other group.

Otherwise, can i install more runner in one VM server.

Upvotes: 2

Views: 6505

Answers (2)

IngoMeyer
IngoMeyer

Reputation: 463

Currently, GitLab does not support to assign one runner to multiple groups as a group runner. You could assign the runner to the complete GitLab instance instead (as @adam-marshall already mentioned) but then it will be usable by all members of your GitLab server.

You can try gitlab-multi-group-runner which circumvents this problem by assigning a specific runner to all projects of given GitLab groups with the GitLab API. However, this tool needs administration access to the GitLab server.

Upvotes: 3

Adam Marshall
Adam Marshall

Reputation: 7725

The answers to both your questions are yes, but for the first, it depends on if you use gitlab.com or a self-hosted version, and what you have access to.

First for the second part, yes, you can register a second (or third, fourth, ...) running on the same physical host. Just go through the registration process again. Also check the concurrent value in your config.toml file since that controls how many jobs can be running concurrently on that host. If it's lower than the number of runners you have, then they can't all be used at the same time, but sometimes that's on purpose. It's up to you to decide.

For the first part, you can install runners that are shared across the whole instance, but if you're using gitlab.com, only the Gitlab team can do this, so you'd have to use their shared runners. In the Group's CI/CD settings page, you can enable or disable Shared Runners from the gitlab instance for that group.

Otherwise, if you're using self-hosted, you can go to the admin area by clicking the wrench icon in the main nav bar, then go to "Runners" under the Overview tag on the left. On this page you can get the instance's registration token. Any runners registered using this token (opposed to a project's token or a group's token) will be available for all groups and projects on the Gitlab instance. You can also edit existing runners so that they aren't "locked" to a single project from here.

More information can be found in the docs.

Upvotes: 2

Related Questions