From b7ec25b883020695abb550d8fc169275c86a9e27 Mon Sep 17 00:00:00 2001
From: Jean-Baptiste Pasquier <contact@jbpasquier.eu>
Date: Mon, 28 Sep 2020 12:42:13 +0000
Subject: [PATCH] cicd: lescanumeriques, cpe & lepool

---
 .gitlab-ci.yml | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 704c6db2..5f572996 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -607,3 +607,57 @@ toulouse:
   when: manual
   tags:
     - deploy
+
+lepool:
+  stage: deployment
+  environment:
+    name: lepool
+    url: https://lepool.hubl.world
+  before_script:
+    - npm ci --cache .npm --prefer-offline --only=production
+  script:
+    - echo "$APP_CONFIG_LEPOOL" > config.json
+    - echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key
+    - npm run build
+    - scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* lepool@astral.startinblox.com:~/front/
+  only:
+    - master
+  when: manual
+  tags:
+    - deploy
+
+cpe:
+  stage: deployment
+  environment:
+    name: cpe
+    url: https://cpe.hubl.world
+  before_script:
+    - npm ci --cache .npm --prefer-offline --only=production
+  script:
+    - echo "$APP_CONFIG_CPE" > config.json
+    - echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key
+    - npm run build
+    - scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* cpe@astral.startinblox.com:~/front/
+  only:
+    - master
+  when: manual
+  tags:
+    - deploy
+
+lescanumeriques:
+  stage: deployment
+  environment:
+    name: lescanumeriques
+    url: https://fichemetier.fr.hubl.world
+  before_script:
+    - npm ci --cache .npm --prefer-offline --only=production
+  script:
+    - echo "$APP_CONFIG_LESCANUMERIQUES" > config.json
+    - echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key
+    - npm run build
+    - scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* lescanumeriques@astral.startinblox.com:~/front/
+  only:
+    - master
+  when: manual
+  tags:
+    - deploy
\ No newline at end of file
-- 
GitLab