From 1eb333beee4ce5d21d4a2f5b3929a4e13965398b Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Fri, 20 Jul 2018 18:20:57 +0200 Subject: [PATCH] Implement build cache --- .drone.yml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/.drone.yml b/.drone.yml index 9f1d35f..b5a626e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,4 +1,24 @@ pipeline: + restore-cache-dev: + image: drillster/drone-volume-cache + restore: true + mount: + - public + volumes: + - /home/gitea/gitea/drone_build_cache/staging.vbrandl.net:/cache + when: + branch: develop + + restore-cache-prod: + image: drillster/drone-volume-cache + restore: true + mount: + - public + volumes: + - /home/gitea/gitea/drone_build_cache/vbrandl.net:/cache + when: + branch: master + build-dev: image: cbrgm/drone-hugo:latest buildDrafts: true @@ -45,3 +65,23 @@ pipeline: secrets: [ rsync_key ] when: branch: master + + rebuild-cache-dev: + image: drillster/drone-volume-cache + rebuild: true + mount: + - public + volumes: + - /home/gitea/gitea/drone_build_cache/staging.vbrandl.net:/cache + when: + branch: develop + + rebuild-cache-prod: + image: drillster/drone-volume-cache + rebuild: true + mount: + - public + volumes: + - /home/gitea/gitea/drone_build_cache/vbrandl.net:/cache + when: + branch: master