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

Test gitlab-ci sonar scanner

parent 9edd7c6f
Pipeline #1548 failed
......@@ -23,7 +23,7 @@ php-metrics:
policy: push
only:
refs:
- develop
- sonar
php-metrics-build:
image: docker:stable
......@@ -42,7 +42,7 @@ php-metrics-build:
policy: pull
only:
refs:
- develop
- sonar
php-metrics-deploy:
image: alpine
......@@ -52,33 +52,43 @@ php-metrics-deploy:
- curl -XPOST $METRICS_WEBHOOK
only:
refs:
- develop
- sonar
install:
image: jakzal/phpqa
stage: install
script:
- composer install
- composer install --ignore-platform-reqs
cache:
paths:
- vendor
policy: push
only:
refs:
- develop
- sonar
phpunit:
image: jakzal/phpqa
stage: test
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:
paths:
- vendor
policy: pull
- coverage
policy: pull-push
only:
refs:
- sonar
sonar_scanner:
image: portus.lam.fr/ci-tools/sonar-scanner:latest
stage: sonar
script:
- sonar-scanner -Dsonar.projectKey=anis-server -Dsonar.sources=src -Dsonar.host.url=https://sonarqube.lam.fr -Dsonar.login=$SONAR_TOKEN -Dsonar.php.tests.reportPath=./coverage/junit-logfile.xml -Dsonar.php.coverage.reportPaths=./coverage/clover.xml
only:
refs:
- develop
- sonar
build:
image: docker:stable
......@@ -94,7 +104,7 @@ build:
policy: pull
only:
refs:
- develop
- sonar
deploy:
image: alpine
......@@ -104,4 +114,4 @@ deploy:
- curl -XPOST $DEV_WEBHOOK
only:
refs:
- develop
\ No newline at end of file
- sonar
\ No newline at end of file
Markdown is supported
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