除非标记,否则阻止 Gitlab CI Runners 执行 运行 任务

Prevent Gitlab CI Runners from running tasks unless tagged

Gitlab 工作和 运行 人员可以被标记 - 因此只有 运行 带有标签的人员才能 运行 工作。请参阅此处的文档:http://docs.gitlab.com/ce/ci/yaml/README.html#tags

我想确保我的 运行 有标签的人 接受有标签的工作。目前没有任何标签的工作也有资格 运行 这些 运行 人。

这可以做到吗?

  1. Choose whether the Runner should pick up jobs that do not have tags, you can change this later in GitLab's UI (defaults to false):
  • 在管理面板中https://<SERVER>/admin/runners
  • 并在您特定的 运行 用户的配置对话框中 (URL: https://<PROJECT_URL>/settings/ci_cd)

...您可以将选项设置为仅 运行 标记的作业。

如果你也tag your jobs accordingly,你就达到了你的目标。

例如:

job:
  tags:
    - ruby
    - postgres