From 4b87e472ee995c3fcdc942150e49a539370eeb4a Mon Sep 17 00:00:00 2001
From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com>
Date: Tue, 14 Dec 2021 12:29:07 +0100
Subject: [PATCH 1/3] fix: make sonar jov fail in case of quality gate issue

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

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5a243713c..b8ad068b7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -116,7 +116,9 @@ code_analysis:
       -Dsonar.projectBaseDir=.
       -Dsonar.host.url=${SONAR_URL}
       -Dsonar.projectKey=${SONAR_PROJECT_KEY}
+      -Dsonar.exclusions=**/*mock.*.ts,**/*spec.ts
       -Dsonar.login=${SONAR_TOKEN}
+      -Dsonar.qualitygate.wait=true
 
 mr:
   image: docker:18.09
-- 
GitLab


From 7299dbb09f3e6b79f2f672f89d39118ac1a557a6 Mon Sep 17 00:00:00 2001
From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com>
Date: Tue, 14 Dec 2021 12:41:55 +0100
Subject: [PATCH 2/3] fix: update gitlabci

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

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b8ad068b7..e53c05e8e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -104,6 +104,7 @@ code_analysis:
   stage: sonar-analysis
   only:
     - dev
+    - merge_requests
   before_script:
     - export NODE_PATH=$NODE_PATH:`npm root -g`
     - npm install -g typescript
-- 
GitLab


From fe29d920cd6a2b484022c296c78af7180696be71 Mon Sep 17 00:00:00 2001
From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com>
Date: Tue, 14 Dec 2021 12:46:23 +0100
Subject: [PATCH 3/3] fix: docker image

---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e53c05e8e..fedae8fb6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -98,7 +98,7 @@ deploy_rec:
     - docker system prune -a -f
 
 code_analysis:
-  image: skilldlabs/sonar-scanner:3.4.0
+  image: registry.forge.grandlyon.com/apoyen2/sonnar-scanner-gl:master
   services:
     - docker:18.09-dind
   stage: sonar-analysis
-- 
GitLab