Skip to content

Commit

Permalink
Merge pull request #5257 from ChrisBr/ci/bundle-cache
Browse files Browse the repository at this point in the history
[CI] Try with docker build OBS images
  • Loading branch information
ChrisBr committed Jul 3, 2018
2 parents 147572c + b4f2bf2 commit 1c032d2
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .circleci/config.yml
Expand Up @@ -8,6 +8,7 @@ aliases:
NOKOGIRI_USE_SYSTEM_LIBRARIES: 1
EAGER_LOAD: 1
<<: *cc_test_reporter_id
user: frontend
- image: registry.opensuse.org/obs/server/unstable/container/sle12/sp3/images/openbuildservice/mariadb:latest
command: |
/bin/bash -c 'echo -e "[mysqld]\ndatadir = /dev/shm" > /etc/my.cnf.d/obs.cnf && cp -a /var/lib/mysql/* /dev/shm && /usr/lib/mysql/mysql-systemd-helper start'
Expand All @@ -18,23 +19,24 @@ aliases:
environment:
NOKOGIRI_USE_SYSTEM_LIBRARIES: 1
<<: *cc_test_reporter_id
user: frontend
- image: registry.opensuse.org/obs/server/unstable/container/sle12/sp3/images/openbuildservice/mariadb:latest
command: |
/bin/bash -c 'echo -e "[mysqld]\ndatadir = /dev/shm" > /etc/my.cnf.d/obs.cnf && cp -a /var/lib/mysql/* /dev/shm && /usr/lib/mysql/mysql-systemd-helper start'
name: db
- &restore_bundle_cache
keys:
- v2-dependencies-{{ checksum "./src/api/Gemfile.lock" }}
- v3-dependencies-{{ checksum "./src/api/Gemfile.lock" }}
# fallback to using the latest cache if no exact match is found
- v2-dependencies-
- v3-dependencies-
- &save_bundle_cache
paths:
- ./src/api/vendor/bundle
- /usr/lib64/ruby/gems/2.5.0/gems/
key: v2-dependencies-{{ checksum "./src/api/Gemfile.lock" }}
- &install_dependencies
name: install dependencies
command: |
cd ./src/api && bundle install --jobs=4 --retry=3 --path vendor/bundle
cd ./src/api && bundle install --jobs=4 --retry=3
- &wait_for_database
name: Wait for DB
command: mysqladmin ping -h db
Expand Down Expand Up @@ -184,6 +186,7 @@ jobs:
- image: registry.opensuse.org/obs/server/unstable/container/sle12/sp3/images/openbuildservice/frontend-base:latest
environment:
<<: *cc_test_reporter_id
user: frontend
steps:
- attach_workspace:
at: /tmp
Expand Down

0 comments on commit 1c032d2

Please sign in to comment.