feat: smarter clean-up solution
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
surtur 2020-06-14 22:23:10 +02:00
parent 7dac459754
commit b5ac44c87a
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

View File

@ -1226,7 +1226,8 @@ steps:
from_secret: B2_KEY
commands:
- b2 authorize-account $B2_KEY_ID $B2_KEY
- ( cd /run/cache/archives; b2 upload-file --contentType 'application/zstd' "$B2_BUCKET_NAME" "results-$(date +%Y-%m-%dT%H-%M)-${DRONE_COMMIT_SHA:0:7}.tar.zstd" "results/results-$(date +%Y-%m-%dT%H-%M)-${DRONE_COMMIT_SHA:0:7}.tar.zstd" > /dev/null 2>&1 && rm results-*-${DRONE_COMMIT_SHA:0:7}.tar.zstd )
- ( cd /run/cache/archives; b2 upload-file --contentType 'application/zstd' "$B2_BUCKET_NAME" "results-$(date +%Y-%m-%dT%H-%M)-${DRONE_COMMIT_SHA:0:7}.tar.zstd" "results/results-$(date +%Y-%m-%dT%H-%M)-${DRONE_COMMIT_SHA:0:7}.tar.zstd" > /dev/null 2>&1 )
- rm /run/cache/archives/*.tar.zstd
volumes:
- name: cache