diff --git a/.drone.yml b/.drone.yml index 6a66f4b..71bfa51 100644 --- a/.drone.yml +++ b/.drone.yml @@ -36,7 +36,7 @@ steps: depends_on: [build_net7, build_maui] - - name: code-inspection-linux-only + - name: image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dronesonarplugin-dotnet7 secrets: [ SECRET_SONAR_LOGIN ] settings: @@ -55,4 +55,25 @@ steps: when: event: - push - depends_on: [tests] \ No newline at end of file + depends_on: [tests] + + + + - name: code-inspection-linux-only + image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dronesonarplugin-dotnet7 + secrets: [ SECRET_SONAR_LOGIN ] + environment: + sonar_host: https://codefirst.iut.uca.fr/sonar/ + sonar_token: + from_secret: SECRET_SONAR_LOGIN + project_key: MineGuideTheApp + coverage_exclusions: "Tests/**" + commands: + - cd Sources/ + - dotnet restore MineGuide_linuxOnly.sln + - dotnet sonarscanner begin /k:$${project_key} /d:sonar.host.url=$${sonar_host} /d:sonar.coverageReportPaths="../Documentation/coveragereport/SonarQube.xml" /d:sonar.coverage.exclusions=$${coverage_exclusions} /d:sonar.login=$${sonar_token} + - dotnet build MineGuide_linuxOnly.sln -c Release --no-restore + - dotnet test MineGuide_linuxOnly.sln --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage" + - reportgenerator -reports:"**/coverage.cobertura.xml" -reporttypes:SonarQube -targetdir:"../Documentation/coveragereport" + - dotnet publish MineGuide_linuxOnly.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release + - dotnet sonarscanner end /d:sonar.login=$${sonar_token} \ No newline at end of file