From ee34e13e3a9037e248cd79222fff152dd3854cc7 Mon Sep 17 00:00:00 2001 From: Dominic Grimm Date: Fri, 18 Feb 2022 18:43:45 +0100 Subject: [PATCH] Update ci --- .drone.yml | 81 +++++++++++++++++++++++++++--------------------------- 1 file changed, 40 insertions(+), 41 deletions(-) diff --git a/.drone.yml b/.drone.yml index daef89c..c3a0802 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,3 +1,37 @@ +--- +kind: pipeline +type: docker +name: clear-cache + +steps: + - name: restore-cache + image: drillster/drone-volume-cache + volumes: + - name: cache + path: /cache + settings: + restore: true + mount: + - ./docs + - name: clear-cache + image: alpine + commands: + - rm -rf /cache/* + - name: rebuild-cache + image: drillster/drone-volume-cache + volumes: + - name: cache + path: /cache + settings: + rebuild: true + mount: + - ./docs + +volumes: + - name: cache + host: + path: /tmp/cache + --- kind: pipeline type: docker @@ -31,7 +65,6 @@ steps: commands: - cd docs - mdbook build - - mkdir -p /cache/docs - mv book/* /cache/docs depends_on: - markdownlint @@ -53,6 +86,9 @@ volumes: host: path: /tmp/cache +depends_on: + - clear-cache + --- kind: pipeline type: docker @@ -106,6 +142,9 @@ volumes: host: path: /var/run/docker.sock +depends_on: + - clear-cache + --- kind: pipeline type: docker @@ -171,43 +210,3 @@ trigger: - promote target: - production - ---- -kind: pipeline -type: docker -name: clear-cache - -steps: - - name: restore-cache - image: drillster/drone-volume-cache - volumes: - - name: cache - path: /cache - settings: - restore: true - mount: - - ./docs - - name: clear-cache - image: alpine - commands: - - rm -rf /cache/* - - name: rebuild-cache - image: drillster/drone-volume-cache - volumes: - - name: cache - path: /cache - settings: - rebuild: true - mount: - - ./docs - -volumes: - - name: cache - host: - path: /tmp/cache - -depends_on: - - default - - backend - - frontend - - deploy