Skip to content

Commit

Permalink
chore: fixing cache
Browse files Browse the repository at this point in the history
  • Loading branch information
obecny committed Dec 15, 2020
1 parent 5b2015f commit ac22ecd
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .circleci/checksum.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ fi

openssl md5 package.json >> $FILE

find detectors/node/*/package.json | xargs -I{} openssl md5 {} >> $FILE
find metapackages/*/package.json | xargs -I{} openssl md5 {} >> $FILE
find packages/*/package.json | xargs -I{} openssl md5 {} >> $FILE
find plugins/node/*/package.json | xargs -I{} openssl md5 {} >> $FILE
find plugins/web/*/package.json | xargs -I{} openssl md5 {} >> $FILE
find propagators/*/package.json | xargs -I{} openssl md5 {} >> $FILE

sort -o $FILE $FILE
24 changes: 17 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,30 @@ mysql_service: &mysql_service
MYSQL_ROOT_PASSWORD: rootpw

cache_1: &cache_1
key: npm-cache-01-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/checksums.txt" }}
key: npm-cache-02-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/checksums.txt" }}
paths:
- ./node_modules
- ./package-lock.json
- detectors/node/opentelemetry-resource-detector-github/node_modules
- metapackages/plugins-node-core-and-contrib/node_modules
- packages/opentelemetry-host-metrics/node_modules
- packages/opentelemetry-test-utils/node_modules
- plugins/node/opentelemetry-hapi-instrumentation/node_modules
- plugins/node/opentelemetry-instrumentation-graphql/node_modules
- plugins/node/opentelemetry-koa-instrumentation/node_modules
- plugins/node/opentelemetry-plugin-dns/node_modules
- plugins/node/opentelemetry-plugin-express/node_modules
- plugins/node/opentelemetry-plugin-ioredis/node_modules
- plugins/node/opentelemetry-plugin-mongodb/node_modules
- plugins/node/opentelemetry-plugin-redis/node_modules
- plugins/node/opentelemetry-plugin-mysql/node_modules
- plugins/node/opentelemetry-plugin-pg/node_modules
- plugins/node/opentelemetry-plugin-document-load/node_modules
- plugins/node/opentelemetry-plugin-pg-pool/node_modules
- plugins/node/opentelemetry-plugin-mysql/node_modules
- plugins/node/opentelemetry-plugin-express/node_modules
- plugins/node/opentelemetry-plugin-redis/node_modules
- plugins/web/opentelemetry-plugin-document-load/node_modules
- plugins/web/opentelemetry-plugin-react-load/node_modules
- plugins/web/opentelemetry-plugin-user-interaction/node_modules
- propagators/opentelemetry-propagator-jaeger/node_modules
- propagators/opentelemetry-propagator-grpc-census-binary/node_modules

node_unit_tests: &node_unit_tests
resource_class: large
Expand All @@ -74,7 +84,7 @@ node_unit_tests: &node_unit_tests
echo "CIRCLE_NODE_VERSION=${CIRCLE_NODE_VERSION}"
- restore_cache:
keys:
- npm-cache-01-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/checksums.txt" }}-F267A71D
- npm-cache-02-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/checksums.txt" }}-F267A71D
- run:
name: Install Root Dependencies
command: npm install --ignore-scripts
Expand Down Expand Up @@ -109,7 +119,7 @@ browsers_unit_tests: &browsers_unit_tests
echo "CIRCLE_NODE_VERSION=${CIRCLE_NODE_VERSION}"
- restore_cache:
keys:
- npm-cache-01-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/checksums.txt" }}-F267A71D
- npm-cache-02-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/checksums.txt" }}-F267A71D
- run:
name: Install Root Dependencies
command: npm install --ignore-scripts
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ jobs:
id: cache
with:
path: |
./node_modules
./package-lock.json
node_modules
packages/*/node_modules
detectors/node/*/node_modules
metapackages/*/node_modules
packages/*/node_modules
plugins/node/*/node_modules
plugins/web/*/node_modules
propagators/*/node_modules
Expand Down

0 comments on commit ac22ecd

Please sign in to comment.