From b4c4bda2196fe6b5a14445dde15dc429806a2b0e Mon Sep 17 00:00:00 2001
From: Benoit Lavenier <benoit.lavenier@e-is.pro>
Date: Thu, 24 Jun 2021 20:37:30 +0200
Subject: [PATCH] [fix] FIx CI build

---
 .gitlab-ci.yml | 8 ++++----
 package.json   | 1 +
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ea7d9581f..f4310d78d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -44,6 +44,7 @@ variables:
   stage: build
   tags: [redshift]
   script:
+    - yarn install
     - yarn run build:web
   after_script:
     - ls -la dist/web/
@@ -59,7 +60,6 @@ build:
   image: ${CI_BUILD_IMAGE}
   before_script:
     - mv /tmp/.build-cache/node_modules ./
-    - yarn run postinstall
   only:
     - develop
 
@@ -68,7 +68,7 @@ failsafe-build:
   stage: alt_build
   when: on_failure
   before_script:
-    - yarn
+    - yarn global add gulp
   only:
     - develop
 
@@ -89,8 +89,8 @@ docker:ci:
     - echo 'RUN du -s `find . -maxdepth 1 | egrep -v "^\.$"` > /tmp/before.txt' >> Dockerfile
     - echo 'RUN du -s `find /tmp/.cache/yarn -maxdepth 1 | egrep -v "^\.$"` >> /tmp/before.txt' >> Dockerfile
     # Install dependencies
-    #- echo 'RUN yarn global add gulp web-ext @ionic/cli' >> Dockerfile
-    - echo 'RUN yarn' >> Dockerfile
+    - echo 'RUN yarn global add gulp web-ext @ionic/cli' >> Dockerfile
+    - echo 'RUN yarn install' >> Dockerfile
     # Store disk usage (after install)
     - echo 'RUN du -s `find . -maxdepth 1 | egrep -v "^\.$"` > /tmp/after.txt' >> Dockerfile
     - echo 'RUN du -s `find /tmp/.cache/yarn -maxdepth 1 | egrep -v "^\.$"` >> /tmp/after.txt' >> Dockerfile
diff --git a/package.json b/package.json
index 3c9ccd83f..847f72010 100644
--- a/package.json
+++ b/package.json
@@ -12,6 +12,7 @@
   "scripts": {
     "clean": "gulp clean webClean webExtClean && rm -rf dist/web dist/android && rm -f desktop/**/cesium-*.deb desktop/**/cesium-*.exe platforms/android/**/*.apk",
     "postinstall": "node scripts/node/postinstall.js",
+    "gulp": "gulp",
     "lint": "gulp lint",
     "install-platforms": "ionic cordova prepare",
     "start": "ionic serve",
-- 
GitLab