|
|
@ -17,23 +17,23 @@ steps:
|
|
|
|
- dotnet restore HeartTrack.sln
|
|
|
|
- dotnet restore HeartTrack.sln
|
|
|
|
- dotnet build HeartTrack.sln -c Release --no-restore
|
|
|
|
- dotnet build HeartTrack.sln -c Release --no-restore
|
|
|
|
- name: code-analysis
|
|
|
|
- name: code-analysis
|
|
|
|
image: mcr.microsoft.com/dotnet/sdk:8.0
|
|
|
|
image: mcr.microsoft.com/dotnet/sdk:8.0
|
|
|
|
secrets: [ SECRET_SONAR_LOGIN ]
|
|
|
|
secrets: [ SECRET_SONAR_LOGIN ]
|
|
|
|
environment:
|
|
|
|
environment:
|
|
|
|
sonar_host: https://codefirst.iut.uca.fr/sonar/
|
|
|
|
sonar_host: https://codefirst.iut.uca.fr/sonar/
|
|
|
|
sonar_token:
|
|
|
|
sonar_token:
|
|
|
|
from_secret: SECRET_SONAR_LOGIN
|
|
|
|
from_secret: SECRET_SONAR_LOGIN
|
|
|
|
project_key: MyProjectKey
|
|
|
|
project_key: MyProjectKey
|
|
|
|
coverage_exclusions: "Tests/**"
|
|
|
|
coverage_exclusions: "Tests/**"
|
|
|
|
commands:
|
|
|
|
commands:
|
|
|
|
- cd src/
|
|
|
|
- cd src/
|
|
|
|
- dotnet restore HeartTrack.sln
|
|
|
|
- dotnet restore HeartTrack.sln
|
|
|
|
- dotnet sonarscanner begin /k:${project_key} /d:sonar.host.url=${sonar_host} /d:sonar.login=${sonar_token} /d:sonar.coverage.exclusions=${coverage_exclusions} /d:sonar.coverageReportPaths="coveragereport/SonarQube.xml"
|
|
|
|
- dotnet sonarscanner begin /k:${project_key} /d:sonar.host.url=${sonar_host} /d:sonar.login=${sonar_token} /d:sonar.coverage.exclusions=${coverage_exclusions} /d:sonar.coverageReportPaths="coveragereport/SonarQube.xml"
|
|
|
|
- dotnet build HeartTrack.sln -c Release --no-restore
|
|
|
|
- dotnet build HeartTrack.sln -c Release --no-restore
|
|
|
|
- dotnet test HeartTrack.sln --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage"
|
|
|
|
- dotnet test HeartTrack.sln --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage"
|
|
|
|
- reportgenerator -reports:"**/coverage.cobertura.xml" -reporttypes:SonarQube -targetdir:"coveragereport"
|
|
|
|
- reportgenerator -reports:"**/coverage.cobertura.xml" -reporttypes:SonarQube -targetdir:"coveragereport"
|
|
|
|
- dotnet publish HeartTrack.csproj -c Release --no-restore -o $CI_PROJECT_DIR/build/release -f:net8
|
|
|
|
- dotnet publish HeartTrack.csproj -c Release --no-restore -o $CI_PROJECT_DIR/build/release -f:net8
|
|
|
|
- dotnet sonarscanner end /d:sonar.login=${sonar_token}
|
|
|
|
- dotnet sonarscanner end /d:sonar.login=${sonar_token}
|
|
|
|
|
|
|
|
|
|
|
|
- name: generate-and-deploy-docs
|
|
|
|
- name: generate-and-deploy-docs
|
|
|
|
image: hub.codefirst.iut.uca.fr/maxime.batista/codefirst-docdeployer
|
|
|
|
image: hub.codefirst.iut.uca.fr/maxime.batista/codefirst-docdeployer
|
|
|
|