From b50d1c5919b4790f04ef37bb8d5493429f62aae7 Mon Sep 17 00:00:00 2001
From: Eliot Berriot <contact@eliotberriot.com>
Date: Sun, 25 Jun 2017 18:05:29 +0200
Subject: [PATCH] Should cache node modules between jobs

---
 .gitlab-ci.yml | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5eaaec1e..058b505f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -19,12 +19,19 @@ build_front:
   image: node:6-alpine
   before_script:
     - cd front
+
   script:
     - npm install
     - npm run build
+    - mv dist /dist
+  cache:
+    key: "$CI_COMMIT_REF_NAME"
+    paths:
+      - front/node_modules
   artifacts:
+    name: "front_${CI_COMMIT_REF_NAME}"
     paths:
-      - front/dist
+      - /dist
   only:
     - master
     - develop
-- 
GitLab