美文网首页
GitLab-CI Runner 为什么要配置 tags,如何省

GitLab-CI Runner 为什么要配置 tags,如何省

作者: X4tar | 来源:发表于2021-01-11 18:26 被阅读0次

Using tags
You must setup a Runner to be able to run all the different types of jobs
that it may encounter on the projects it's shared over. This would be
problematic for large amounts of projects, if it wasn't for tags.
By tagging a Runner for the types of jobs it can handle, you can make sure
shared Runners will only run the jobs they are equipped to run.
For instance, at GitLab we have Runners tagged with "rails" if they contain
the appropriate dependencies to run Rails test suites.

Preventing Runners with tags from picking jobs without tags
You can configure a Runner to prevent it from picking
jobs with tags when the Runner does not have tags
assigned. This setting can be enabled the first
time you register a Runner and can be changed afterwards under
each Runner's settings.
To make a Runner pick tagged/untagged jobs:

Visit your project's Settings ➔ CI/CD

  1. Find the Runner you wish and make sure it's enabled
  2. Click the pencil button
  3. Check the Run untagged jobs option
  4. Click Save changes for the changes to take effect

相关文章

网友评论

      本文标题:GitLab-CI Runner 为什么要配置 tags,如何省

      本文链接:https://www.haomeiwen.com/subject/pksyuktx.html