From 77adf555a5866011e0bddce479eb2d4d8c9b1e9c Mon Sep 17 00:00:00 2001
From: ManifoldFR <wilson.jallet@gmail.com>
Date: Wed, 7 Mar 2018 00:50:22 +0100
Subject: [PATCH] =?UTF-8?q?S=C3=A9paration=20install=20et=20build?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .gitlab-ci.yml | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 6826f47..71edfcb 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -14,6 +14,7 @@ cache:
   - ldap_connexion_config.json
 
 stages:
+  - install
   - build
   - test
   - deploy
@@ -22,22 +23,30 @@ stages:
 
 # Install dependencies, compile the bundle.js,
 # make migrations on and seed the db
+install-dependencies:
+  stage: install
+  script:
+    - npm install
+  artifacts:
+    paths:
+      - build/
+      - node_modules/
+    expire_in: 240 min
+  tags:
+    - build
+
 build:
   stage: build
   script:
-    - npm install
     - npm run build
     - knex migrate:latest
     - knex seed:run
   artifacts:
     paths:
-      - ldap_connexion_config.json
       - build/
-      - node_modules/
-    expire_in: 240 min
   tags:
-    - database
     - build
+    - database
 
 # Run ESLint to analyse our JS code
 test:lint:
@@ -47,7 +56,7 @@ test:lint:
   tags:
     - lint
 
-deploy_staging:
+deploy-staging:
   stage: deploy
   only:
     - master
-- 
GitLab