From b12a6e95df37684b04234fc76cc5c2f9ca4665b0 Mon Sep 17 00:00:00 2001
From: Jean-Baptiste Pasquier <contact@jbpasquier.eu>
Date: Fri, 6 Nov 2020 15:57:11 +0100
Subject: [PATCH] cicd: phares esspace grande-coco espace-imaginaire
 halles-civiques collectif-tansition-citoyenne studios-singuliers

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

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index cbb1b511..cbbf6355 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -624,5 +624,131 @@ lescanumeriques:
   only:
     - master
   when: manual
+  tags:
+    - deploy
+
+phares:
+  stage: deployment
+  environment:
+    name: phares
+    url: https://le.phares.hubl.world
+  before_script:
+    - npm ci --cache .npm --prefer-offline --only=production
+  script:
+    - echo "$APP_CONFIG_LE_PHARES" > 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/* phares@astral.startinblox.com:~/front/
+  only:
+    - master
+  when: manual
+  tags:
+    - deploy
+
+esspace:
+  stage: deployment
+  environment:
+    name: esspace
+    url: https://ess.pace.hubl.world
+  before_script:
+    - npm ci --cache .npm --prefer-offline --only=production
+  script:
+    - echo "$APP_CONFIG_ESSPACE" > 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/* esspace@astral.startinblox.com:~/front/
+  only:
+    - master
+  when: manual
+  tags:
+    - deploy
+
+grandecoco:
+  stage: deployment
+  environment:
+    name: grandecoco
+    url: https://la.grande.coco.hubl.world
+  before_script:
+    - npm ci --cache .npm --prefer-offline --only=production
+  script:
+    - echo "$APP_CONFIG_COCO" > 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/* grande-coco@astral.startinblox.com:~/front/
+  only:
+    - master
+  when: manual
+  tags:
+    - deploy
+
+espaceimaginaire:
+  stage: deployment
+  environment:
+    name: espaceimaginaire
+    url: https://espace-imaginaire.hubl.world
+  before_script:
+    - npm ci --cache .npm --prefer-offline --only=production
+  script:
+    - echo "$APP_CONFIG_ESPACEIMAGINAIRE" > 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/* espace-imaginaire@astral.startinblox.com:~/front/
+  only:
+    - master
+  when: manual
+  tags:
+    - deploy
+
+hallesciviques:
+  stage: deployment
+  environment:
+    name: hallesciviques
+    url: https://les.halles.civiques.hubl.world
+  before_script:
+    - npm ci --cache .npm --prefer-offline --only=production
+  script:
+    - echo "$APP_CONFIG_HALLES" > 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/* halles-civiques@astral.startinblox.com:~/front/
+  only:
+    - master
+  when: manual
+  tags:
+    - deploy
+
+ctc:
+  stage: deployment
+  environment:
+    name: ctc
+    url: https://collectif.tansition.citoyenne.hubl.world
+  before_script:
+    - npm ci --cache .npm --prefer-offline --only=production
+  script:
+    - echo "$APP_CONFIG_CTC" > 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/* collectif-tansition-citoyenne@astral.startinblox.com:~/front/
+  only:
+    - master
+  when: manual
+  tags:
+    - deploy
+
+studiossinguliers:
+  stage: deployment
+  environment:
+    name: studiossinguliers
+    url: https://studios-singuliers.hubl.world
+  before_script:
+    - npm ci --cache .npm --prefer-offline --only=production
+  script:
+    - echo "$APP_CONFIG_SINGULIER" > 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/* studios-singuliers@astral.startinblox.com:~/front/
+  only:
+    - master
+  when: manual
   tags:
     - deploy
\ No newline at end of file
-- 
GitLab