From a1b6928af7bbc12edfb7fb5dc35e832cc360f9c8 Mon Sep 17 00:00:00 2001 From: Alexandre AGOSTINHO Date: Fri, 29 Mar 2024 15:39:48 +0100 Subject: [PATCH] Update 'README.md' --- README.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1aeba14..3cc6fbd 100644 --- a/README.md +++ b/README.md @@ -1 +1,18 @@ -# PHP code analysis for drone pipline \ No newline at end of file +# 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}/**" +``` \ No newline at end of file