由于 RAM 限制,我的 Gitlab CI 作业失败。
页https://docs.gitlab.com/ee/user/gitlab_com/index.html说:
All your CI/CD jobs run on n1-standard-1 instances with 3.75GB of RAM, CoreOS and the latest Docker Engine installed.
下面写着:
The gitlab-shared-runners-manager-X.gitlab.com fleet of runners are dedicated for GitLab projects as well as community forks of them. They use a slightly larger machine type (n1-standard-2) and have a bigger SSD disk size. They don’t run untagged jobs and unlike the general fleet of shared runners, the instances are re-used up to 40 times.
那么,如何启用这些 n1-standard-2
运行器(具有 7.5 GB RAM)?我一遍又一遍地阅读文档,但似乎找不到任何说明。
最佳答案
免责声明:我没有检查您是否可以在项目中使用它们以及它们是否适合您的 gitlab CI/CD - 但这就是您如何检查可用的 Runner 及其标签以及如何使用它们。术语 GitLab 项目及其社区分支
的意思是,这仅适用于官方 GitLab 项目及其分支 - 而不是 GitLab 上的随机项目。
您可以在项目 CI/CD 设置中的“运行程序”下检查所有可用的运行程序,您将看到一个运行程序列表,如下所示:
正如您所看到的,有一些带有 gitlab-org 标签的运行者。根据描述,如果不使用标签,您将无法运行它们。因此,您需要使用这些适当的标签来调整您的 .gitlab-ci.yml
文件。
EG:
job:
tags:
- gitlab-org
关于gitlab云 CI : how to increase memory for shared runner,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66237168/