Skip to content
Snippets Groups Projects
Commit 4482314b authored by FORESTIER Fabien's avatar FORESTIER Fabien
Browse files

Add sonarqube analysis job in gitlab-ci

parent f032d28e
No related branches found
No related tags found
1 merge request!9Update the license
Pipeline #3686 passed
stages:
- sonar-analysis
- build
- deploy
......@@ -6,6 +7,7 @@ variables:
USER_SUPPORT_MAILBOX: alpha-test@erasme.org
SMTP_HOST: mail0.erasme.org
SMTP_PORT: 25
SONAR_URL: https://sonarqube.forge.grandlyon.com
# ADDITIONAL_FEEDBACK_EMAILS:
build_development:
......@@ -19,12 +21,28 @@ build_development:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker-compose push
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_release:
stage: build
only:
- tags
# except:
# - /^(?!master).+@/
script:
- export TAG=$(echo $CI_COMMIT_TAG | sed 's/v//g')
- export MAIL_SERVICE_BIND_PORT=3000
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment