摘要
After updating our build system to Ubuntu 20.04, any job using the Shell executor fails:
Running with gitlab-runner 13.1.1 (6fbc7474)
on [redacted]
Preparing the "shell" executor
00:00
Using Shell executor...
Preparing environment
00:00
Running on [redacted]...
ERROR: Job failed (system failure): prepare environment: exit status 1. Check https://docs.gitlab.com/runner/shells/index.html#shell-profile-loading for more information
当我们使用Ubuntu18.04提供一个runner实例时,Shell执行器将按预期工作。
复制的步骤
使用Ubuntu18.04提供一个新的runner实例,并将其注册为runner。它将成功运行Shell作业。使用Ubuntu20.04提供一个新的runner实例,遵循与前面完全相同的步骤,并将其注册为一个运行程序。空壳作业将失败。我们使用Ansible来提供我们的跑步者,这是我们唯一的改变。我们尝试了几次从相同的脚本配置18.04和20.04,只更改了AMI ID。
当前的错误行为是什么?
使用Shell executor的作业在“准备环境”步骤中失败。
预期的正确行为是什么?
使用Shell执行器的作业通过“准备环境”步骤并执行shell脚本。
注意:这个问题最初是在这里提出的,gitlab-社区
发布于 2022-03-29 12:38:05
我在AWSUbuntu20.04上使用gitlab runner的shell执行器也有相同的错误,我从/home/gitlab-runner
中删除了所有的/home/gitlab-runner
文件,这似乎解决了这个问题。
如果您的用户名gitlab运行以下命令
sudo rm -rf /home/gitlab-runner/.*
这个答案最初是在这里给出的,gitlab-社区
https://stackoverflow.com/questions/71662174
复制相似问题