配置运行器同时运行多个作业

问题描述 投票:0回答:2

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

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

我似乎没有在任何地方找到这方面的配置解释。

gitlab gitlab-ci gitlab-ci-runner
2个回答
55
投票

我相信您正在寻找的配置选项是

concurrent
limit
,您可以在 GitLab Runners
config.toml
文件中更改它们。

来自文档

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

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

config.toml
文件的位置:

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

也很有用问题


0
投票

运行命令(Linux系统):

 $ sudo cat /etc/gitlab-runner/config.toml

而不是改变 的值:

concurrent = 1

© www.soinside.com 2019 - 2024. All rights reserved.