diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1a3407acce0e6dd22163d75449cea99db91569f9..28952014ea447b5ba775b8fa506bc316e1ec3a4f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,9 +1,29 @@ stages: + - sonar-analysis - build - deploy variables: PROXY_HOST_TARGET: https://download.data.grandlyon.com + 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