配置runner同时运行多个job [英] Configure runner to run multiple jobs at the same time

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

问题描述

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

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

是否可以让 gitlab runner 并行运行所有项目的管道?

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.

推荐答案

我相信您正在寻找的配置选项是 concurrentlimit,您可以更改它们在 GitLab Runners config.toml 文件中.

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

来自文档:

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

  • 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: limit how many jobs can be handled concurrently by this token.

config.toml 文件的位置:

  • /etc/gitlab-runner/config.toml 在 GitLab Runner 运行时在 *nix 系统上以root身份执行(这也是服务配置的路径)
  • ~/.gitlab-runner/config.toml 在 GitLab Runner 运行时在 *nix 系统上以非 root 身份执行
  • ./config.toml 在其他系统上
  • /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

问题也很有用.

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

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