配置运行程序以同时运行多个作业 [英] Configure runner to run multiple jobs at the same time

查看:461
本文介绍了配置运行程序以同时运行多个作业的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当一个gitlab运行器服务于多个项目时,它只能运行一个CI管道,而其他项目管道则必须排队.

是否可以使gitlab运行程序并行运行所有项目中的管道?

我似乎在任何地方都找不到配置说明.

解决方案

我相信您要查找的配置选项是concurrentlimit,您可以在GitLab Runners config.toml文件中进行更改. /p>

文档:

  • concurrent:限制全局可以同时运行的作业数.使用所有已定义的运行器的作业的最高限制. 0并不代表无限

  • limit:限制此令牌可以同时处理多少个作业.

config.toml文件的位置:

    当GitLab Runner为*时,在* nix系统上为
  • /etc/gitlab-runner/config.toml 以root身份执行(这也是服务配置的路径)
  • 当GitLab Runner为*时,在* nix系统上为
  • ~/.gitlab-runner/config.toml 以非root用户身份执行
  • ./config.toml在其他系统上

也有用的问题.

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.

解决方案

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.

这篇关于配置运行程序以同时运行多个作业的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆