I’ve been trying to store_artifacts
with a path
that is itself a relative symbolic link, e.g:
/opt/ws/log# ls -al
drwxr-xr-x 3 root root 4096 Jan 23 01:39 .
drwxr-xr-x 1 root root 4096 Jan 23 01:39 ..
drwxr-xr-x 29 root root 4096 Jan 23 01:41 test_2019-01-23_01-39-12
lrwxrwxrwx 1 root root 12 Jan 23 01:39 latest -> latest_test
lrwxrwxrwx 1 root root 25 Jan 23 01:39 latest_test -> test_2019-01-23_01-39-12
However, it seems that CircleCI doesn’t resolve this path:
Uploading /opt/ws/log/latest_test to opt/ws/log/latest_test
Uploading /opt/ws/log/latest_test (4.1 kB): FAILED with error BodyHashError: failed to compute body hashes
caused by: read /opt/ws/log/latest_test: is a directory
So far I’ve been working around this by duplicating the logs first, but this step seem unnecessary:
steps:
- run:
name: Duplicate Test Logs
when: always
command: cp -rH log/latest_test log/test
- store_artifacts:
path: log/test