You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
797 B
18 lines
797 B
# PHP code analysis for drone pipline
|
|
|
|
### Usage
|
|
```yml
|
|
- name: code-inspection
|
|
image: hub.codefirst.iut.uca.fr/alexandre.agostinho/codefirst-dronesonarplugin-php
|
|
secrets: [ SECRET_SONAR_LOGIN ]
|
|
environment:
|
|
sonar_host: https://codefirst.iut.uca.fr/sonar/
|
|
sonar_token:
|
|
from_secret: SECRET_SONAR_LOGIN
|
|
project_key: << your:project:key >>
|
|
source_folder: << your/source/folder >>
|
|
test_folder: << your/test/folder >>
|
|
commands:
|
|
- phpunit --coverage-clover=coverage.xml --coverage-filter $${source_folder} $${test_folder}
|
|
- sonar-scanner -Dsonar.host.url=$${sonar_host} -Dsonar.login=$${sonar_token} -Dsonar.php.coverage.reportPaths="coverage.xml" -Dsonar.projectKey=$${project_key} -Dsonar.coverage.exclusions="$${test_folder}/**"
|
|
``` |