Commit 557a75ad authored by FORESTIER Fabien's avatar FORESTIER Fabien
Browse files

Add sonarqube analysis job in gitlab-ci file

parent 562ebb2f
Pipeline #3683 passed with stages
in 53 seconds
stages:
- sonar-analysis
- build
- deploy
......@@ -6,6 +7,25 @@ variables:
GROUP_HEADER: x-consumer-groups
ADMIN_GROUP_NAME: admin
ACCESS_TOKEN_COOKIE_KEY: access_token
SONAR_URL: https://sonarqube.forge.grandlyon.com
sonarqube:
stage: sonar-analysis
only:
- development
before_script:
- export PATH=$PATH:/usr/local/bin/sonar-scanner-3.2.0.1227-linux/bin/
- export NODE_PATH=$NODE_PATH:`npm root -g`
script:
- >
sonar-scanner
-Dsonar.projectName=${SONAR_PROJECT_KEY}
-Dsonar.projectVersion=1.0
-Dsonar.sourceEncoding=UTF-8
-Dsonar.projectBaseDir=.
-Dsonar.host.url=${SONAR_URL}
-Dsonar.projectKey=${SONAR_PROJECT_KEY}
-Dsonar.login=${SONAR_TOKEN}
build_development:
stage: build
......@@ -27,8 +47,6 @@ build_release:
- build
only:
- tags
# except:
# - /^(?!master).+@/
script:
- export TAG=$(echo $CI_COMMIT_TAG | sed 's/v//g')
- export POSTGRES_PORT=5432
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment