From 5b285a1bec47bc43e68ba3e3b4775cc66a2a50fb Mon Sep 17 00:00:00 2001
From: hnouts <hnouts@grandlyon.com>
Date: Wed, 4 Jan 2023 18:05:36 +0100
Subject: [PATCH] fixed pipeline dev

---
 .gitlab-ci.yml                            | 12 ++++++++----
 package.json                              |  2 +-
 src/services/environement.service.spec.ts |  2 +-
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e54d75438..52e52ef69 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -50,12 +50,16 @@ build-test:
     - apk add bash
   script:
     - yarn
-    - yarn build
+    - yarn build-dev
+    - git config --global user.name build-pipeline
+    - git config --global user.email "$GIT_USER"
+    - git config --global user.password "$GIT_PWD"
+    - git config user.email "$GIT_USER"
+    - git remote set-url origin https://"$GIT_USER":"$GIT_PWD"@forge.grandlyon.com/web-et-numerique/factory/llle_project/ecolyo.git
+    - git config --global credential.helper store
+    - yarn deploy-test
   only:
     - merge_requests
-  artifacts:
-    paths:
-      - build/assets
 
 build-dev:
   stage: build
diff --git a/package.json b/package.json
index ef91af9f5..74d7582b2 100644
--- a/package.json
+++ b/package.json
@@ -13,7 +13,7 @@
     "cozyPublish": "git fetch origin ${DEPLOY_BRANCH:-build}:${DEPLOY_BRANCH:-build} && cs publish --token $REGISTRY_TOKEN --build-commit $(git rev-parse ${DEPLOY_BRANCH:-build})",
     "deploy": "git-directory-deploy --directory build/ --branch ${DEPLOY_BRANCH:-build}",
     "deploy-dev": "git-directory-deploy --directory build/ --branch ${DEPLOY_BRANCH:-build-dev}",
-    "deploy-test": "git-directory-deploy --directory build/ --branch ${DEPLOY_BRANCH:-build-test} --repo=${DEPLOY_REPOSITORY:-https://forge.grandlyon.com/web-et-numerique/factory/llle_project/ecolyo.git}",
+    "deploy-test": "git-directory-deploy --directory build/ --branch ${DEPLOY_BRANCH:-build-test}",
     "lint": "yarn lint:js",
     "lint:js": "cs lint {src,test}/**/*.{js,jsx,ts,tsx} --fix",
     "load-data": "cd test && importData.bat",
diff --git a/src/services/environement.service.spec.ts b/src/services/environement.service.spec.ts
index 02799398b..4b7474006 100644
--- a/src/services/environement.service.spec.ts
+++ b/src/services/environement.service.spec.ts
@@ -22,7 +22,7 @@ describe('Environement service', () => {
       const result = environmentService.isProduction()
       expect(result).toEqual(false)
       const url = environmentService.getPublicURL()
-      expect(url).toEqual('https://ecolyo-agent-rec.grandlyon.com')
+      expect(url).toEqual('https://ecolyo-agent-rec.apps.grandlyon.com')
     })
   })
 
-- 
GitLab