如何使用 VirtualBox 执行器设置 Gitlab-runner

How to set up a Gitlab-runner using VirtualBox executor

我正在尝试使用 VirtualBox 作为执行程序来设置 Gitlab 特定的运行程序。

我使用的是 macOS 10.15.5,这是我所做的:

然后在我的Gitlab项目中Settings -> CI/CD可以看到激活的运行ner

但是如果我提交 .gitlab-ci.yml 文件,运行器管道会失败并出现以下错误:

Preparing the "virtualbox" executor
ERROR: Job failed (system failure): exec: "vboxmanage": executable file not found in $PATH

我根据 Google 搜索尝试了所有方法来解决此问题(尤其是尝试了 https://github.com/docker/machine/issues/4590 中的所有方法),但无法解决此问题。

我该如何解决这个问题?

假设您正在谈论本地 GitLab 服务器,第一步是在您的系统上搜索 vboxmanage(无论如何)。

第二步是 troubleshoot the GitLab Runner,确保其 PATH 包含 vboxmanage