I have cached some files including UTF-8 chars (which are Japanese), but these were broken after restore_cache. Here is my config.yml:
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
build:
docker:
- image: circleci/node:8.14
working_directory: ~/repo
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run: npm install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
- run: npm test
- run: npm run build
- save_cache:
paths:
- dist
key: v1-dist-{{ .Environment.CIRCLE_SHA1 }}
- run: ls dist -a
deploy:
docker:
- image: google/cloud-sdk
steps:
- run: apt-get install -y sudo # https://discuss.circleci.com/t/sudo-command-not-found/14208/4
- run: echo $GCLOUD_SERVICE_KEY | base64 --decode | sudo gcloud auth activate-service-account --key-file=-
- run: sudo gcloud --quiet config set project ${GOOGLE_PROJECT_ID}
- run: sudo gcloud --quiet config set compute/zone ${GOOGLE_COMPUTE_ZONE}
- restore_cache:
keys:
- v1-dist-{{ .Environment.CIRCLE_SHA1 }}
- run:
command: ls dist -a
working_directory: /home/circleci/repo/
- run:
name: Upload to GCS
command: gsutil -m -h "Cache-Control:public, max-age=86400" cp -r dist/* gs://(bucket)
working_directory: /home/circleci/repo/
workflows:
version: 2
build-and-deploy:
jobs:
- build
- deploy:
requires:
- build
filters:
branches:
only: master
And these are screenshots showing result of ls -a
in Circle CI.
- deploy:
How can I cache these files correctly?