Próbowałem wykorzystać pamięć podręczną Gitlab Ci dla mojej aplikacji ruby na szynach, ale jak dotąd nie miałem szczęścia, moja aplikacja korzysta ze współdzielonych biegaczy, może to jest problem?Jak korzystać z pamięci podręcznej dla projektu szyn w Gitlab CI?
Oto treść mojego .gitlab-ci.yml
services:
- postgres:latest
rspec:
stage: test
script:
- apt-get update -qy
- apt-get install -y nodejs
- gem install bundler
- bundle check --path vendor/bundle || bundle install --path vendor/bundle --jobs $(nproc)
- cp config/database.gitlab-ci.yml config/database.yml
- RAILS_ENV=test bundle exec rake db:create db:schema:load
- bundle exec rspec
cache:
paths:
- vendor/bundle
tags:
- ruby
- postgres
Kiedy moje testy zakończą widzę biegacz sprawdzanie pamięci podręcznej, ale nigdy nie przywraca go:
gitlab-ci-multi-runner 1.1.3 (a470667)
Using Docker executor with image ruby:2.1 ...
Pulling docker image postgres:latest ...
Starting service postgres:latest ...
Waiting for services to be up and running...
Pulling docker image ruby:2.1 ...
Running on runner-8a2f473d-project-1129003-concurrent-0 via runner-8a2f473d-machine-1462982763-a9a70bd7-digital-ocean-4gb...
Cloning repository...
Cloning into '/builds/foo/bar'...
Checking out 30ea1b5f as master...
Note: checking out '30ea1b5f036808f7e27bfa32e939c1f591343ba6'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 30ea1b5... Fix width of tables contained in table-scroll divs
Checking cache for rspec/master...
$ apt-get update -qy
A gdy budowa jest kończy się, widzę, że próbuje utworzyć pamięć podręczną:
Creating cache rspec/master...
vendor/bundle: found 8917 matching files
Dowolna pomysły?
Dzięki za odpowiedź @raj! Pamięć podręczna faktycznie zaczęła działać poprawnie kilka tygodni po tym, jak opublikowałem to pytanie, nie wymagano żadnych zmian w mojej konfiguracji. Uważam, że miało to związek z aktualizacją gitlab. –