I have quite a simple GitLab CI-setup:
- Once per branch, a job runs which creates the
backoffice imagefor my tests. The idea is to do the repetitive stuff once by creating a custom docker-image to save resources. That contains installing libraries withaptandgemandbundle. - With that
backoffice imageI execute all the tests. That runs very quickly because all the libraries are already installed in my custom image. No downloads. Nice.
It was working perfectly when I built it.
Now, a few weeks later, I come back to it and it is broken. The tests complain about missing gems:
/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)
While my custom backoffice image shows that everything was installed correctly:
+ 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.
What broke?