From eddcca849cd292f75477ebff1b46947d8b6782d5 Mon Sep 17 00:00:00 2001 From: Julius de Jeu Date: Sat, 4 Dec 2021 14:34:05 +0100 Subject: [PATCH] Add drone caching --- .drone.yml | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index fbad27b..76f6df6 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,10 +3,48 @@ type: kubernetes name: default steps: + - name: restore + image: plugins/s3-cache + settings: + pull: true + endpoint: https://s3.voidcorp.nl + access_key: + from_secret: s3accesskey + secret_key: + from_secret: s3secretkey + restore: true + - name: test image: rust:1.56 environment: - CARGO_HOME: ./.cargo_home + CARGO_HOME: .cargo_home commands: - cargo build --verbose --all - cargo test --verbose --all + + - name: rebuild + image: plugins/s3-cache + settings: + pull: true + endpoint: https://s3.voidcorp.nl + access_key: + from_secret: s3accesskey + secret_key: + from_secret: s3secretkey + rebuild: true + mount: + - .cargo_home + when: + event: push + + - name: flush + image: plugins/s3-cache + settings: + pull: true + endpoint: https://s3.voidcorp.nl + access_key: + from_secret: s3accesskey + secret_key: + from_secret: s3secretkey + flush: true + flush_age: 14