Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configure runner to run multiple jobs at the same time

Tags:

When having one gitlab runner serving multiple projects, it can only run one CI pipeline while the other project pipelines have to queue.

Is it possible to make a gitlab runner run pipelines from all projects in parallel?

I don't seem to find anywhere a configuration explanation for this.

like image 821
Roderick Jonsson Avatar asked Aug 13 '18 18:08

Roderick Jonsson


People also ask

Do GitLab jobs run in parallel?

When there are many team members waiting on a running pipeline to finish to be able to make a contribution to the project, the productivity of the team takes a hit. GitLab provides a method to make clones of a job and run them in parallel for faster execution using the parallel: keyword.

What is a shared runner?

With shared runners, this means that anyone that runs jobs on the runner, can access anyone else's code that runs on the runner. In addition, because you can get access to the runner token, it is possible to create a clone of a runner and submit false builds, for example.


1 Answers

I believe the configuration options you are looking for is concurrent and limit, which you'd change in the GitLab Runners config.toml file.

From the documentation:

  • concurrent: limits how many jobs globally can be run concurrently. The most upper limit of jobs using all defined runners. 0 does not mean unlimited

  • limit: limit how many jobs can be handled concurrently by this token.

The location for the config.toml file:

  • /etc/gitlab-runner/config.toml on *nix systems when GitLab Runner is executed as root (this is also path for service configuration)
  • ~/.gitlab-runner/config.toml on *nix systems when GitLab Runner is executed as non-root
  • ./config.toml on other systems

Useful issue as well.

like image 91
Rekovni Avatar answered Sep 28 '22 18:09

Rekovni