GitLab Runner - 如何一次只允许一个管道 运行

GitLab Runner - How to allow only one Pipeline run at a time

我是 GitLab 的新手,面临一个问题,如果我在同一个 gitlab-运行ner 上同时触发两个管道,它们都会 运行 并行并导致失败。我想要的是一次限制 运行 一个管道,而其他管道则在队列中。

我已经在 config.toml 中设置了 concurrent = 1 并重新启动了 运行ner 但它没有帮助。我的最终目标是防止 运行 上的多管道 运行。

谢谢。

将配置 the runners section 中的 limit 关键字设置为 1。

limit :

Limit how many jobs can be handled concurrently by this token. 0 (default) simply means don’t limit

并重新启动你的跑步者

在作业中设置 resource_group,并为所有其他应阻止的任务指定一个唯一的名称。

示例来自 documentation

deploy-to-production:
  script: deploy
  resource_group: production