|
|
|
@ -41,18 +41,18 @@ steps:
|
|
|
|
|
sonar_host: https://codefirst.iut.uca.fr/sonar/
|
|
|
|
|
sonar_token:
|
|
|
|
|
from_secret: SECRET_SONAR_LOGIN
|
|
|
|
|
project_key: BookApp_Louis
|
|
|
|
|
project_key: BookApp
|
|
|
|
|
coverage_exclusions: "Tests/**"
|
|
|
|
|
commands:
|
|
|
|
|
- cd src/
|
|
|
|
|
- dotnet restore BookApp.sln
|
|
|
|
|
- dotnet sonarscanner begin /k:$${project_key} /d:sonar.host.url=$${sonar_host} /d:sonar.coverageReportPaths="coveragereport/SonarQube.xml" /d:sonar.coverage.exclusions=$${coverage_exclusions} /d:sonar.login=$${sonar_token}
|
|
|
|
|
- dotnet sonarscanner begin /k:$${project_key} /d:sonar.host.url=$${sonar_host} /d:sonar.coverageReportPaths="coveragereport/SonarQube.xml" /d:sonar.coverage.exclusions=$${coverage_exclusions} /d:sonar.login=$${SECRET_SONAR_LOGIN}
|
|
|
|
|
- dotnet build BookApp.sln -c Release --no-restore /p:AndroidSdkDirectory=$ANDROID_SDK_ROOT -property:Aapt2ToolPath=$ANDROID_SDK_ROOT/build-tools/33.0.0
|
|
|
|
|
- dotnet test BookApp.sln --logger trx --no-restore /p:AndroidSdkDirectory=$ANDROID_SDK_ROOT -property:Aapt2ToolPath=$ANDROID_SDK_ROOT/build-tools/33.0.0 /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage"
|
|
|
|
|
- reportgenerator -reports:"**/coverage.cobertura.xml" -reporttypes:SonarQube -targetdir:"coveragereport"
|
|
|
|
|
- dotnet publish BookApp/BookApp.csproj -c Release --no-restore -o $CI_PROJECT_DIR/build/release -f:net7.0-android /p:AndroidSdkDirectory=/usr/lib/android-sdk
|
|
|
|
|
- dotnet sonarscanner end /d:sonar.login=$${sonar_token}
|
|
|
|
|
depends_on: [test]
|
|
|
|
|
- dotnet sonarscanner end /d:sonar.login=$${SECRET_SONAR_LOGIN}
|
|
|
|
|
depends_on: [build]
|
|
|
|
|
|
|
|
|
|
- name: generate-and-deploy-docs
|
|
|
|
|
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-docdeployer
|
|
|
|
|