diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4f6c3816077cdaabc527644184dcc2273bb25313..436d7ac2cfcdf5df50689ccf52c4a865c187ae71 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,5 @@ stages: + - sonar-analysis - build - deploy @@ -7,6 +8,25 @@ variables: ADMIN_USERNAME: data-beta-grandlyon-com USER_SUPPORT_MAILBOX: alpha-test@erasme.org 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