Commit a4863e28 authored by Ernesto Rodriguez Ortiz's avatar Ernesto Rodriguez Ortiz
Browse files

Merge branch 'ci/improve-ci-steps' into '2.x'

Use docker executor to run health check and sonar

Fix the `.gitlab-ci.yml` to properly run a simple health check, and a [SonarQube](http://sonarqube.org/) static analysis.


The SonarQube instance runs at https://sonarqube.savoirfairelinux.net/. Credentials to login are available in SFLvault (m#2222)

See merge request !18
parents 1e575ae7 4f5200f5
Pipeline #1191 passed with stages
in 3 minutes and 54 seconds
stages:
- test
- quality
health-check:
image: python:2.7
stage: test
script:
- pip install fabric
- fab --version
- fab -f . --list-format=nested --list
sonar:
tags:
- docker-images
sonarqube:
image: ntdt/sonar-scanner:2.7
stage: quality
script:
- /opt/sonar-scanner/bin/sonar-scanner -Dsonar.host.url='https://sonarqube.savoirfairelinux.net' -Dsonar.login='8317c73bde6903c2cca1fbcc2148a937602fbc97' -Dsonar.analysis.mode=preview -Dsonar.issuesReport.console.enable=true -Dsonar.gitlab.commit_sha=$CI_BUILD_REF -Dsonar.gitlab.ref=$CI_BUILD_REF_NAME
- cd $CI_PROJECT_DIR && /opt/sonar-scanner/bin/sonar-scanner -Dsonar.host.url=$SONAR_HOST -Dsonar.login=$SONAR_TOKEN
tags:
- docker-images
Supports Markdown
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