同阶段的Gitlab pipeline jobs不是运行并行

Gitlab pipeline jobs in the same stage are not running in parallel

我们在同一阶段有 4 个部署作业,可以 运行 同时进行。来自 Gitlab 文档:

The ordering of elements in stages defines the ordering of jobs' execution:

  1. Jobs of the same stage are run in parallel.

  2. Jobs of the next stage are run after the jobs from the previous stage complete successfully.

但是,发生的情况是一次只有一个作业 运行,而其他作业则处于待处理状态。为了让它并行执行,我可能还需要做其他事情吗?我正在使用一个 运行ner 和一个托管在 Ubuntu 16.04 实例上的 shell 执行器。

您的运行器应配置为启用并发作业(参见 https://docs.gitlab.com/runner/configuration/advanced-configuration.html

concurrent = 4

或者您可能想要设置多个跑步者。

我也运行遇到这个问题。我需要同时 运行 多项任务。我使用了我能找到的一切(从需要到并行)。但是,我的任务仍然按顺序执行。我的每一项任务都待命。结果证明解决方案非常简单。 打开文件 /etc/gitlab-runner/config.toml concurent 以获得所需的并行任务数。