feat: use sort-of-a-static filename
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
* uses current date and time so it's pretty dynamic, only sometimes too dynamic
This commit is contained in:
parent
46389a3839
commit
aca536bfca
|
@ -1186,10 +1186,11 @@ steps:
|
|||
- curl -sS https://dotya.ml/store/0x28bd2388.asc | gpg --quiet --import -
|
||||
- gpg -eR 28bd2388 --trust-model always archives/results-${DRONE_COMMIT_SHA:0:7}.tar.zstd
|
||||
- ( cd archives; sha512sum results-${DRONE_COMMIT_SHA:0:7}.tar.zstd.gpg > results-${DRONE_COMMIT_SHA:0:7}.tar.zstd.gpg-SHA512SUM )
|
||||
- ( 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 )
|
||||
- ( cd archives; date +%Y-%m-%dT%H-%M > dat_date)
|
||||
- ( cd archives; tar cfv results-$(cat dat_date)-${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} /run/cache/docs
|
||||
- rm -r /run/cache/results-${DRONE_COMMIT_SHA}
|
||||
when:
|
||||
status:
|
||||
- success
|
||||
|
@ -1242,8 +1243,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 /run/cache/archives/*.tar.zstd
|
||||
- ( cd /run/cache/archives; b2 upload-file --contentType 'application/zstd' "$B2_BUCKET_NAME" "results-$(cat dat_date)-${DRONE_COMMIT_SHA:0:7}.tar.zstd" "results/results-$(cat dat_date)-${DRONE_COMMIT_SHA:0:7}.tar.zstd" > /dev/null 2>&1 )
|
||||
- rm /run/cache/archives/*.tar.zstd /run/cache/archives/dat_date
|
||||
|
||||
volumes:
|
||||
- name: cache
|
||||
|
|
Reference in New Issue