gitlab云 CI : how to increase memory for shared runner

标签 gitlab gitlab-ci

由于 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 设置中的“运行程序”下检查所有可用的运行程序,您将看到一个运行程序列表,如下所示:

enter image description here

正如您所看到的,有一些带有 gitlab-org 标签的运行者。根据描述,如果不使用标签,您将无法运行它们。因此,您需要使用这些适当的标签来调整您的 .gitlab-ci.yml 文件。

EG:

job:
  tags:
    - gitlab-org

参见GitLab documentation for tags

关于gitlab云 CI : how to increase memory for shared runner,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66237168/

相关文章:

gitlab - 如何在自动运行的情况下手动运行 GitLab CI 管道?

docker - 为什么docker gitlab/gitlab-runner使用 “/etc/gitlab-runner”和 “/home/gitlab-runner”作为VOLUME?

gitlab-ci - git-secret: gpg: [不知道]: 部分长度对于 gitlab ci 作业中的数据包类型 20 无效

git - 如何从gitlab存储中完全删除一个大文件

docker - 如何为同一个 docker 注册表使用多个身份验证/登录

gitlab - 如何创建 Gitlab webhook 以接收帖子或从其他 webapp 获取请求

docker - 从 DinD 内部运行的容器访问 GitLab CI 服务

gitlab-ci - GitLab CI Runner 突然变慢了

gitlab-ci - 使 kubectl 在 gitlab ci 中工作

git - 将网络存储附加到 Gitlab 的 Docker 容器(ssh 问题)