introducing the proper way to use B2
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
surtur 2020-05-11 02:16:41 +02:00
parent fb1424d949
commit 0760c22b35
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

@ -98,19 +98,22 @@ steps:
- name: cache
path: /run/cache
environment:
B2_ACCOUNT:
from_secret: b2_account
B2_BUCKET_NAME:
from_secret: B2_BUCKET_NAME
B2_KEY_ID:
from_secret: B2_KEY_ID
B2_KEY:
from_secret: B2_KEY
commands:
- ls -la /run/cache
- curl -sO https://git.dotya.ml/wanderer/dotfiles/raw/branch/master/bin/b2-ul_me
- chmod +x b2-ul_me
- ./b2-ul_me "/run/cache/archives/results-${DRONE_COMMIT_SHA:0:7}.tar.zstd.gpg-SHA512SUM" 'text/plain' "$B2_KEY_ID" "$B2_KEY"
- ./b2-ul_me "/run/cache/archives/results-${DRONE_COMMIT_SHA:0:7}.tar.zstd.gpg" 'application/zstd' "$B2_KEY_ID" "$B2_KEY"
- pip install b2
- b2 authorize-account $B2_KEY_ID $B2_KEY
- b2 upload-file "$B2_BUCKET_NAME" "/run/cache/archives/results-${DRONE_COMMIT_SHA:0:7}.tar.zstd.gpg-SHA512SUM" "results/results-${DRONE_COMMIT_SHA:0:7}.tar.zstd.gpg-SHA512SUM" > /dev/null 2>&1
- b2 upload-file "$B2_BUCKET_NAME" "/run/cache/archives/results-${DRONE_COMMIT_SHA:0:7}.tar.zstd.gpg" "results/results-${DRONE_COMMIT_SHA:0:7}.tar.zstd.gpg" > /dev/null 2>&1
# - curl -sO https://git.dotya.ml/wanderer/dotfiles/raw/branch/master/bin/b2-ul_me
# - chmod +x b2-ul_me
# - ./b2-ul_me "/run/cache/archives/results-${DRONE_COMMIT_SHA:0:7}.tar.zstd.gpg-SHA512SUM" 'text/plain' "$B2_KEY_ID" "$B2_KEY"
# - ./b2-ul_me "/run/cache/archives/results-${DRONE_COMMIT_SHA:0:7}.tar.zstd.gpg" 'application/zstd' "$B2_KEY_ID" "$B2_KEY"
volumes:
- name: cache