当前位置: 首页 > news >正文

Gitlab CICD Cache 路径错误导致失败,表现为重复路径

View Post

Gitlab CICD Cache 路径错误导致失败,表现为重复路径

现象

执行cache操作时,出现重复路径导致报错,类似:

bash: line 165: /root/builds/1iDLpGhkY/0/mvp/backend/builds/1iDLpGhkY/0/mvp/backend.tmp/gitlab_runner_cache_env: No such file or directory

相关issue

参考: https://gitlab.com/gitlab-org/gitlab-runner/-/issues/39078

临时解决方案

参考: https://gitlab.com/gitlab-org/gitlab-runner/-/issues/39078#note_2859441279
即降版本到 18.3.1-1

安装方式参考

环境: Ubuntu 22.04

# 添加apt源
curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh | sudo bash
# 如果需要当前环境的代理则
curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh | sudo -E bash# 安装18.3.1-1版本
sudo apt install gitlab-runner=18.3.1-1 gitlab-runner-helper-images=18.3.1-1