|
|
|
@ -10,13 +10,9 @@ steps:
|
|
|
|
|
- name: build
|
|
|
|
|
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dronesonarplugin-dotnet6
|
|
|
|
|
commands:
|
|
|
|
|
# On se positionne dans le dossier du projet
|
|
|
|
|
- cd WF-WebAdmin/WF-WebAdmin
|
|
|
|
|
# Restauration des dépendances
|
|
|
|
|
- dotnet restore WF-WebAdmin.csproj
|
|
|
|
|
# Compilation en mode Release
|
|
|
|
|
- dotnet build WF-WebAdmin.csproj -c Release --no-restore
|
|
|
|
|
# Publication de l'application dans le dossier build/publish du workspace
|
|
|
|
|
- dotnet publish WF-WebAdmin.csproj -c Release --no-restore -o $CI_PROJECT_DIR/build/publish
|
|
|
|
|
|
|
|
|
|
- name: tests
|
|
|
|
@ -42,6 +38,7 @@ steps:
|
|
|
|
|
- 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 build WF-WebAdmin.csproj -c Release --no-restore
|
|
|
|
|
- dotnet test WF-WebAdmin.csproj --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage"
|
|
|
|
|
- ls -R
|
|
|
|
|
- reportgenerator -reports:"**/coverage.cobertura.xml" -reporttypes:SonarQube -targetdir:"coveragereport"
|
|
|
|
|
- dotnet publish WF-WebAdmin.csproj -c Release --no-restore -o $CI_PROJECT_DIR/build/publish
|
|
|
|
|
- dotnet sonarscanner end /d:sonar.login=$${sonar_token}
|
|
|
|
@ -59,5 +56,3 @@ steps:
|
|
|
|
|
password:
|
|
|
|
|
from_secret: docker_password
|
|
|
|
|
depends_on: [build, tests, code-inspection]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|