【发布时间】:2022-11-10 17:28:39
【问题描述】:
我有一个非常简单的 GitLab CI 设置:
- 每个分支运行一次作业,为我的测试创建
backoffice image。这个想法是通过创建自定义 docker-image 来做一次重复的工作以节省资源。这包含使用apt和gem和bundle安装库。 - 有了
backoffice image,我执行了所有的测试。这运行得非常快,因为所有库都已安装在我的自定义映像中。没有下载。好的。当我建造它时,它工作得很好。
现在,几周后,我回到它,它坏了。测试抱怨缺少宝石:
/usr/local/bundle/gems/bundler-2.3.23/lib/bundler/definition.rb:508:in `materialize': Could not find passenger-6.0.14, sinatra-2.2.1, sinatra-contrib-2.2.1, haml-5.2.2, mustermann-1.1.2, rack-protection-2.2.1, tilt-2.0.10 in locally installed gems (Bundler::GemNotFound)虽然我的自定义
backoffice image显示一切都已正确安装:+ bundle install Fetching gem metadata from https://rubygems.org/............ Resolving dependencies... [... stuff removed] Installing passenger 6.0.15 with native extensions Fetching rack-protection 3.0.2 Installing rack-protection 3.0.2 Fetching sinatra 3.0.2 Installing sinatra 3.0.2 Fetching sinatra-contrib 3.0.2 Installing sinatra-contrib 3.0.2 Bundle complete! 6 Gemfile dependencies, 16 gems now installed.什么破了?
【问题讨论】:
标签: ruby-on-rails ruby continuous-integration rubygems bundler