How to use specific runners for different gitlab installations?

I am planning on put some personal work on a repo in gitlab.com. I also have some repos in a gitlab installation in another server for work.

Now, I would like to use specific runners to enable CI in my repos.

I am learning how to install and register runners but in the registration part it says you have to specify your url and your token,

The thing is that I have two different urls (gitlab.com and the gitlab server from work) and two different tokens

So what do I do in this case?

Do I have to create two runners? How? (which part of the installation method is done only once and which twice?)

Describe your question in as much detail as possible:

  • What are you seeing, and how does that differ from what you expect to see?
    I am seeing that a runner is registered to one gitlab server.

Yes, but if you put concurrent = 1 at the top of /etc/gitlab-runner/config.toml on the runner server, it should only run one job across all the defined runners (the definitions).

The only thing you should need to do twice is the gitlab-runner register ...-command (ont time against gitlab.com and one time against the server for work)

Thanks

Yes, but if you put concurrent = 1 at the top of /etc/gitlab-runner/config.toml on the runner server, it should only run one job across all the defined runners (the definitions).

Could you explain what is this for?

It’s for creating two runners (like you suspected you needed to, as you seem to know how to do it, apart from the url and the token it’s same command). But only run jobs from one GitLab server (I took a guess and guesses that was why you hesitated in just trying to register your runner against two GitLab servers - if I was wrong, you can just ignore that part).