From fc8cfaab3406ebc4ae9ca6fe5241703fb2a9dc0c Mon Sep 17 00:00:00 2001 From: peter Date: Sun, 7 Jul 2019 17:48:05 +0000 Subject: [PATCH] added caching to pipeline --- .drone.yml | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index f33e8a8..1636fd5 100644 --- a/.drone.yml +++ b/.drone.yml @@ -2,6 +2,17 @@ kind: pipeline name: default steps: + +- name: restore cache + image: drillster/drone-volume-cache + settings: + restore: true + mount: + - ./node_modules + volumes: + - name: cache + path: /cache + - name: npm install image: node:12 commands: @@ -12,6 +23,16 @@ steps: commands: - npm run build +- name: rebuild cache + image: drillster/drone-volume-cache + settings: + rebuild: true + mount: + - ./node_modules + volumes: + - name: cache + path: /cache + - name: deliver container image: plugins/docker settings: @@ -60,4 +81,9 @@ steps: from_secret: docker_password when: event: - - tag \ No newline at end of file + - tag + +volumes: +- name: cache + host: + path: /tmp \ No newline at end of file