Skip to content

Commit 3d569d6

Browse files
author
Winter Dong
committed
Try caching entire rbenv dir
1 parent bd66faa commit 3d569d6

File tree

2 files changed

+7
-15
lines changed

2 files changed

+7
-15
lines changed

.drone.yml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ steps:
3838
image: wintercdo/code-dot-org:0.7
3939
volumes:
4040
- name: rbenv
41-
path: /home/circleci/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0
42-
- name: yarncache
43-
path: /home/circleci/.cache
41+
path: /home/circleci/.rbenv
4442
- name: mysql
4543
path: /var/lib/mysql
4644
environment:
@@ -52,17 +50,14 @@ steps:
5250
- pwd
5351
- sudo chown -R circleci:circleci .
5452
- # cache is restored to source directory, so we need to copy it into the right place
55-
- cp -rn "$(pwd)/home/circleci/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0" /home/circleci/.rbenv/versions/2.5.0/lib/ruby/gems || true
56-
- cp -rn "$(pwd)/home/circleci/.cache" /home/circleci || true
53+
- cp -rn "$(pwd)/home/circleci/.rbenv" /home/circleci || true
5754
- /entrypoint.sh docker/unit_tests.sh
5855

5956
- name: update-cache
6057
image: plugins/s3-cache
6158
volumes:
6259
- name: rbenv
63-
path: /home/circleci/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0
64-
- name: yarncache
65-
path: /home/circleci/.cache
60+
path: /home/circleci/.rbenv
6661
settings:
6762
pull: true
6863
rebuild: true
@@ -71,22 +66,19 @@ steps:
7166
secret_key:
7267
from_secret: S3_CACHE_SECRET_KEY
7368
mount:
74-
- /home/circleci/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0
75-
- apps/node_modules
76-
- /home/circleci/.cache
69+
- /home/circleci/.rbenv
7770

7871
volumes:
7972
- name: rbenv
8073
temp: {}
8174
- name: mysql
8275
temp: {}
83-
- name: yarncache
84-
temp: {}
8576

8677
trigger:
8778
event:
8879
include:
8980
- pull_request
81+
- push
9082

9183
# ---
9284
# kind: pipeline

docker/unit_tests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ echo "Wrote secrets from env vars into locals.yml."
5757
set -x
5858

5959
# name: rake install
60-
RAKE_VERBOSE=true mispipe "bundle exec rake install" "ts '[%Y-%m-%d %H:%M:%S]'"
60+
RAKE_VERBOSE=true mispipe "bundle exec rake install --trace" "ts '[%Y-%m-%d %H:%M:%S]'"
6161

6262
# name: rake build
6363
RAKE_VERBOSE=true mispipe "bundle exec rake build --trace" "ts '[%Y-%m-%d %H:%M:%S]'"
6464

6565
# unit tests
66-
bundle exec rake circle:run_tests --trace
66+
#bundle exec rake circle:run_tests --trace
6767

6868
mispipe "echo 'Ending timestamp'" ts

0 commit comments

Comments
 (0)