feat: gently clean-up after the fact
Some checks failed
continuous-integration/drone/push Build is failing

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

View File

@ -1173,7 +1173,7 @@ steps:
- ( cd archives; tar cfv results-$(date +%Y-%m-%dT%H-%M)-${DRONE_COMMIT_SHA:0:7}.tar.zstd results-${DRONE_COMMIT_SHA:0:7}.tar.zstd.gpg results-${DRONE_COMMIT_SHA:0:7}.tar.zstd.gpg-SHA512SUM --zstd --remove-files )
- rm archives/results-${DRONE_COMMIT_SHA:0:7}.tar.zstd
- cp -vR archives /run/cache
- rm -r /run/cache/results-${DRONE_COMMIT_SHA}
- rm -r /run/cache/results-${DRONE_COMMIT_SHA} /run/cache/docs
when:
status:
- success
@ -1226,7 +1226,7 @@ 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 )
- ( 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 )
volumes:
- name: cache