Hi, we are trying to speed up our build times and decided to use Ramdisk however we are getting an error on the second job that needs to read the output from the first job, here is the relevant jobs from our config:
build:
docker:
- image: cimg/node:16.20.2
resource_class: large
working_directory: /mnt/ramdisk
steps:
- checkout
- run:
name: Configure NPM_REGISTRY_TOKEN
command: |
echo $NPM_REGISTRY_TOKEN
sed -i.bak "s/\${NPM_REGISTRY_TOKEN}/${NPM_REGISTRY_TOKEN}/g" .npmrc
- node/install-packages
- run:
name: Build
command: npm run build
- persist_to_workspace:
root: /mnt
paths:
- ramdisk
test:
docker:
- image: cimg/node:16.20.2
resource_class: xlarge
parallelism: 7
working_directory: /mnt/ramdisk
steps:
- attach_workspace:
at: /mnt
- run:
name: Run unit tests
command: |
TEST=$(circleci tests glob "src/**/*.test.ts*")
echo "$TEST" | circleci tests run --command="xargs npm run test:ci" --split-by=timings
environment:
JEST_JUNIT_OUTPUT_DIR: ./coverage/junit
- store_test_results:
path: ./coverage/junit
- codecov/upload:
file: ./coverage/lcov.info
- persist_to_workspace:
root: /mnt
paths:
- ramdisk
This is the error we get:
Error applying workspace layer for job 5295acdf-0e0c-4656-9025-120662cc977c: Error extracting tarball /tmp/workspace-layer-5295acdf-0e0c-4656-9025-120662cc977c739504217 : tar: ramdisk: Cannot utime: Operation not permitted tar: ramdisk: Cannot change mode to rwxr-xr-t: Operation not permitted tar: Exiting with failure status due to previous errors : exit status 2