Commit 887ac87d authored by François Agneray's avatar François Agneray
Browse files

Merge branch 'sonar' into 'develop'

Sonar

See merge request !39
parents 9edd7c6f 7f3c80f8
Pipeline #1554 passed with stages
in 8 minutes and 5 seconds
...@@ -4,10 +4,13 @@ stages: ...@@ -4,10 +4,13 @@ stages:
- metrics-deploy - metrics-deploy
- install - install
- test - test
- sonar
- build - build
- deploy - deploy
variables: variables:
VERSION: "3.0"
SONARQUBE_URL: https://sonarqube.lam.fr
METRICS_IMAGE: portus.lam.fr/anis/anis-server-metrics METRICS_IMAGE: portus.lam.fr/anis/anis-server-metrics
CONTAINER_IMAGE: portus.lam.fr/anis/anis-server CONTAINER_IMAGE: portus.lam.fr/anis/anis-server
...@@ -58,7 +61,7 @@ install: ...@@ -58,7 +61,7 @@ install:
image: jakzal/phpqa image: jakzal/phpqa
stage: install stage: install
script: script:
- composer install - composer install --ignore-platform-reqs
cache: cache:
paths: paths:
- vendor - vendor
...@@ -71,10 +74,24 @@ phpunit: ...@@ -71,10 +74,24 @@ phpunit:
image: jakzal/phpqa image: jakzal/phpqa
stage: test stage: test
script: script:
- phpdbg -qrr ./vendor/bin/phpunit --bootstrap ./tests/bootstrap.php --whitelist src --coverage-text --colors=never ./tests - phpdbg -qrr ./vendor/bin/phpunit --bootstrap ./tests/bootstrap.php --whitelist src --coverage-clover ./coverage/clover.xml --log-junit ./coverage/junit-logfile.xml --colors=never ./tests
cache: cache:
paths: paths:
- vendor - vendor
- coverage
policy: pull-push
only:
refs:
- develop
sonar_scanner:
image: portus.lam.fr/ci-tools/sonar-scanner:latest
stage: sonar
script:
- sonar-scanner -Dsonar.projectKey=anis-server -Dsonar.sources=src -Dsonar.projectVersion=$VERSION -Dsonar.host.url=$SONARQUBE_URL -Dsonar.login=$SONAR_TOKEN -Dsonar.php.tests.reportPath=./coverage/junit-logfile.xml -Dsonar.php.coverage.reportPaths=./coverage/clover.xml
cache:
paths:
- coverage
policy: pull policy: pull
only: only:
refs: refs:
......
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