From a8c603e5abe6aba6f8d4469bffe88789e5af6046 Mon Sep 17 00:00:00 2001
From: Yoan VALLET <ext.sopra.yvallet@grandlyon.com>
Date: Wed, 13 May 2020 17:08:55 +0200
Subject: [PATCH] Change llle params to ecolyo

---
 .gitlab-ci.yml                       | 10 ++++++++++
 .vscode/settings.json                |  4 ++--
 CONTRIBUTING.md                      | 14 +++++++-------
 Dockerfile                           |  4 ++--
 README.md                            | 16 ++++++++--------
 docker-compose.yml                   |  2 +-
 manifest.webapp                      |  2 +-
 package.json                         | 14 +++++++-------
 test/__mocks__/triggerDataMock.json  |  4 ++--
 test/services/_/triggerDataMock.json |  4 ++--
 10 files changed, 42 insertions(+), 32 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 82cfd6c50..4b705a7d5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -30,6 +30,16 @@ build_release:
     - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
   only:
     - tags
+    
+build_stack:
+  stage: build
+  script:
+    - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
+    - docker build -t "$CI_REGISTRY_IMAGE/cozy-env:latest"  ./docker/
+    - docker push $CI_REGISTRY_IMAGE/cozy-env:latest
+  only:
+    - master
+  when: manual
 
 mr_sonarqube:
   stage: test
diff --git a/.vscode/settings.json b/.vscode/settings.json
index cdf2cfd68..c07716f64 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -30,14 +30,14 @@
       "autoFix": true
     }
   ],
-  "gitlab.instanceUrl": "https://forge.grandlyon.com/web-et-numerique/llle",
+  "gitlab.instanceUrl": "https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo",
   "gitlab.ignoreCertificateErrors": true,
   "editor.codeActionsOnSave": {
     "source.fixAll.eslint": true
   },
   "gitlab.showPipelineUpdateNotifications": true,
   "sonarlint.connectedMode.project": {
-    "projectKey": "llle"
+    "projectKey": "ecolyo"
   },
   "cSpell.words": [
     "CONSO",
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index da5f0a3d3..8cae6bb66 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -44,9 +44,9 @@ Pull requests are the primary mechanism we use to change Cozy. GitHub itself has
 Fork the project on GitHub and [check out your copy locally][forking].
 
 ```
-$ git clone github.com/hsubtil/llle.git
-$ cd llle
-$ git remote add fork git://github.com/yourusername/llle.git
+$ git clone https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo.git
+$ cd ecolyo
+$ git remote add fork git://github.com/yourusername/ecolyo.git
 ```
 
 #### Step 2: Branch
@@ -66,7 +66,7 @@ Well, we think you know how to do that. Just be sure to follow the coding guidel
 Don't forget to add tests and be sure they are green:
 
 ```
-$ cd llle
+$ cd ecolyo
 $ npm run test
 ```
 
@@ -91,7 +91,7 @@ $ git rebase origin/master my-branch
 $ git push -u fork my-branch
 ```
 
-Go to https://github.com/yourusername/llle and select your branch. Click the 'Pull Request' button and fill out the form.
+Go to https://github.com/yourusername/ecolyo and select your branch. Click the 'Pull Request' button and fill out the form.
 
 Alternatively, you can use [hub] to open the pull request from your terminal:
 
@@ -119,12 +119,12 @@ You can help us by making our community even more vibrant. For example, you can
 
 
 [conventional-commits]: https://conventionalcommits.org
-[issues]: https://github.com/hsubtil/llle/issues/new
+[issues]: https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/issues/new
 [pr]: https://help.github.com/categories/collaborating-with-issues-and-pull-requests/
 [forking]: http://blog.campoy.cat/2014/03/github-and-go-forking-pull-requests-and.html
 [stdjs]: http://standardjs.com/
 [commitmsg]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
-[localization]: https://github.com/hsubtil/llle/blob/master/README.md#localization
+[localization]: https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/blob/master/README.md#localization
 [hub]: https://hub.github.com/
 [tx]: https://www.transifex.com/cozy/
 [tx-start]: http://docs.transifex.com/getting-started/translators/
diff --git a/Dockerfile b/Dockerfile
index c2ff0f41c..21dcf6be9 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -14,6 +14,6 @@ RUN yarn build
 FROM busybox
 
 # Add application files
-RUN mkdir -p /var/www/llle
+RUN mkdir -p /var/www/ecolyo
 
-COPY --from=builder /app/build /var/www/llle
+COPY --from=builder /app/build /var/www/ecolyo
diff --git a/README.md b/README.md
index 2ec59b13d..884791cd7 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,8 @@
-# LyonLivingLabEnergy
+# Ecolyo
 
-## What's LyonLivingLabEnergy?
+## What's Ecolyo?
 
-LyonLivingLabEnergy (LLLE) is a mobile-first app allowing citizen to visualise easily their energy consumption (electricity, gas, water ...). The app allow simple and more advanced data visualisation
+Ecolyo is a mobile-first app allowing citizen to visualise easily their energy consumption (electricity, gas, water ...). The app allow simple and more advanced data visualisation
 but give also some tips on how to reduce energy consumption. 
 
 
@@ -17,8 +17,8 @@ Hacking the Cozy LyonLivingLabEnergy app requires you to [setup a dev environmen
 You can then clone the app repository and install dependencies:
 
 ```sh
-$ git clone git@forge.grandlyon.com:web-et-numerique/llle.git
-$ cd llle
+$ git clone https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo.git
+$ cd ecolyo
 $ yarn install
 ```
 
@@ -38,11 +38,11 @@ Then you can run your application inside a Cozy thanks to the [cozy-stack docker
 
 ```sh
 # in a terminal, run your app in watch mode with a docker running Cozy
-$ cd llle
+$ cd ecolyo
 $ yarn start
 ```
 
-After the build and the stack launched, your app is now available at http://llle.cozy.tools:8080.
+After the build and the stack launched, your app is now available at http://ecolyo.cozy.tools:8080.
 
 ### Run it inside custom Docker
 For the project we have created our own docker container. For more information on how to use it, please refer to wiki section.
@@ -52,7 +52,7 @@ For the project we have created our own docker container. For more information o
 Tests are run by [jest] under the hood. You can easily run the tests suite with:
 
 ```sh
-$ cd llle
+$ cd ecolyo
 $ yarn test
 ```
 
diff --git a/docker-compose.yml b/docker-compose.yml
index 1f835a6bb..485c4da95 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,6 +1,6 @@
 version: '3.7'
 services:
   app:
-    image: registry.forge.grandlyon.com/web-et-numerique/llle/app:latest
+    image: registry.forge.grandlyon.com/web-et-numerique/llle_project/ecolyo:latest
     hostname: app
     restart: 'no'
diff --git a/manifest.webapp b/manifest.webapp
index aecfb6006..a0e1866a7 100644
--- a/manifest.webapp
+++ b/manifest.webapp
@@ -1,5 +1,5 @@
 {
-  "name": "LyonLivingLabEnergy",
+  "name": "Ecolyo",
   "slug": "ecolyo",
   "icon": "icon.svg",
   "categories": [],
diff --git a/package.json b/package.json
index cc7233b95..0b3980672 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,5 @@
 {
-  "name": "llle",
+  "name": "ecolyo",
   "version": "0.1.0",
   "scripts": {
     "tx": "tx pull --all || true",
@@ -14,7 +14,7 @@
     "watch:browser": "cs watch --browser",
     "watch:mobile": "cs watch --mobile",
     "start:cs": "cs start --hot --browser --no-stack",
-    "deploy": "git-directory-deploy --directory build/ --branch ${DEPLOY_BRANCH:-build} --repo=${DEPLOY_REPOSITORY:-https://forge.grandlyon.com/web-et-numerique/llle/llle.git}",
+    "deploy": "git-directory-deploy --directory build/ --branch ${DEPLOY_BRANCH:-build} --repo=${DEPLOY_REPOSITORY:-https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo.git}",
     "test": "cs test --verbose --coverage",
     "cozyPublish": "git fetch origin ${DEPLOY_BRANCH:-build}:${DEPLOY_BRANCH:-build} && cs publish --token $REGISTRY_TOKEN --build-commit $(git rev-parse ${DEPLOY_BRANCH:-build})",
     "build:css": "node-sass -c ./src/styles -o src/styles",
@@ -22,21 +22,21 @@
     "start": "npm-run-all -p start:cs",
     "build": "yarn run build:css && yarn run build:browser",
     "release": "standard-version --no-verify",
-    "winstack": "start powershell -command docker run --rm -it -p 8080:8080 -p 5984:5984 -p 8025:8025 -v $PWD/build:/data/cozy-app/llle -v $PWD/data/konnectors_sources/:/data/cozy_konnectors/ -v $PWD/data:/usr/local/couchdb/data -v $PWD/docker/disableCSP.yaml:/etc/cozy/cozy.yaml registry.forge.grandlyon.com/web-et-numerique/llle/cozy-env",
-    "linuxstack": "docker run --rm -it -p 8080:8080 -p 5984:5984 -p 8025:8025 -v $(pwd)/build:/data/cozy-app/llle -v ~/cozy/data/db/konnectors_sources/:/data/cozy_konnectors/ -v ~/cozy/data/db:/usr/local/couchdb/data -v ~/cozy/data/storage:/data/cozy-storage -v $(pwd)/docker/disableCSP.yaml:/etc/cozy/cozy.yaml registry.forge.grandlyon.com/web-et-numerique/llle/cozy-env",
+    "winstack": "start powershell -command docker run --rm -it -p 8080:8080 -p 5984:5984 -p 8025:8025 -v $PWD/build:/data/cozy-app/ecolyo -v $PWD/data/konnectors_sources/:/data/cozy_konnectors/ -v $PWD/data:/usr/local/couchdb/data -v $PWD/docker/disableCSP.yaml:/etc/cozy/cozy.yaml registry.forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/cozy-env",
+    "linuxstack": "docker run --rm -it -p 8080:8080 -p 5984:5984 -p 8025:8025 -v $(pwd)/build:/data/cozy-app/ecolyo -v ~/cozy/data/db/konnectors_sources/:/data/cozy_konnectors/ -v ~/cozy/data/db:/usr/local/couchdb/data -v ~/cozy/data/storage:/data/cozy-storage -v $(pwd)/docker/disableCSP.yaml:/etc/cozy/cozy.yaml registry.forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/cozy-env",
     "load-data": "cd test && importData.bat"
   },
   "repository": {
     "type": "git",
-    "url": "git+https://forge.grandlyon.com/web-et-numerique/llle/llle.git"
+    "url": "git+https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo.git"
   },
   "author": "",
   "contributors": [],
   "license": "AGPL-3.0",
   "bugs": {
-    "url": "https://github.com/hsubtil/llle/issues"
+    "url": "https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/issues"
   },
-  "homepage": "https://github.com/hsubtil/llle#readme",
+  "homepage": "https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo#readme",
   "devDependencies": {
     "@babel/preset-typescript": "^7.7.4",
     "@types/d3": "^5.7.2",
diff --git a/test/__mocks__/triggerDataMock.json b/test/__mocks__/triggerDataMock.json
index 4c945af8a..0c699826f 100644
--- a/test/__mocks__/triggerDataMock.json
+++ b/test/__mocks__/triggerDataMock.json
@@ -30,7 +30,7 @@
       "doctypeVersion": "1",
       "metadataVersion": 1,
       "createdAt": "2020-01-16T15:53:50.0323739Z",
-      "createdByApp": "llle",
+      "createdByApp": "ecolyo",
       "updatedAt": "2020-01-16T15:53:50.0323739Z"
     }
   },
@@ -66,7 +66,7 @@
     "doctypeVersion": "1",
     "metadataVersion": 1,
     "createdAt": "2020-01-16T15:53:50.0323739Z",
-    "createdByApp": "llle",
+    "createdByApp": "ecolyo",
     "updatedAt": "2020-01-16T15:53:50.0323739Z"
   }
 }
diff --git a/test/services/_/triggerDataMock.json b/test/services/_/triggerDataMock.json
index 4c945af8a..0c699826f 100644
--- a/test/services/_/triggerDataMock.json
+++ b/test/services/_/triggerDataMock.json
@@ -30,7 +30,7 @@
       "doctypeVersion": "1",
       "metadataVersion": 1,
       "createdAt": "2020-01-16T15:53:50.0323739Z",
-      "createdByApp": "llle",
+      "createdByApp": "ecolyo",
       "updatedAt": "2020-01-16T15:53:50.0323739Z"
     }
   },
@@ -66,7 +66,7 @@
     "doctypeVersion": "1",
     "metadataVersion": 1,
     "createdAt": "2020-01-16T15:53:50.0323739Z",
-    "createdByApp": "llle",
+    "createdByApp": "ecolyo",
     "updatedAt": "2020-01-16T15:53:50.0323739Z"
   }
 }
-- 
GitLab