Mise à jour de '.drone.yml'
continuous-integration/drone/push Build encountered an error Details

WebAPI
Patrick BRUGIERE 1 year ago
parent 532b3295f5
commit c40067a1ac

@ -8,33 +8,37 @@ trigger:
steps:
- name: build
image: mcr.microsoft.com/dotnet/sdk:7.0
image: mcr.microsoft.com/dotnet/sdk:8.0
commands:
- cd Project/adminBlazor/
- dotnet restore adminBlazor.sln
- dotnet build adminBlazor.sln -c Release --no-restore
- cd Project/EntityFramework/
- dotnet restore webAPI.sln
- dotnet build webAPI.sln -c Release --no-restore
- dotnet publish webAPI.sln -c Release --no-restore -o $CI_PROJECT_DIR/build/release
- name: tests
image: mcr.microsoft.com/dotnet/sdk:7.0
image: mcr.microsoft.com/dotnet/sdk:8.0
commands:
- cd Project/adminBlazor
- dotnet restore adminBlazor.sln
- dotnet test adminBlazor.sln --no-restore
- cd Project/EntityFramework/
- dotnet restore webAPI.sln
- dotnet test webAPI.sln --no-restore
depends_on: [build]
- name: code-analysis
image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dronesonarplugin-dotnet7
image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dronesonarplugin-dotnet8
environment:
project_key: SAE_2A_Anglais_Blazor
sonar_host: https://codefirst.iut.uca.fr/sonar/
sonar_token:
from_secret: SECRET_SONAR_LOGIN
commands:
- cd Project/adminBlazor
- dotnet restore adminBlazor.sln
- dotnet sonarscanner begin /k:$${project_key} /d:sonar.host.url=$${sonar_host} /d:sonar.login=$${sonar_token}
- dotnet build adminBlazor.sln -c Release --no-restore
- dotnet sonarscanner end /d:sonar.login=$${sonar_token}
- cd Project/EntityFramework/
- dotnet restore webAPI.sln
- dotnet sonarscanner begin /k:MyProjectKey /d:sonar.host.url=$${PLUGIN_SONAR_HOST} /d:sonar.coverageReportPaths="coveragereport/SonarQube.xml" /d:sonar.coverage.exclusions="Tests/**" /d:sonar.login=$${PLUGIN_SONAR_TOKEN}
- dotnet build webAPI.sln -c Release --no-restore
- dotnet test webAPI.sln --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage"
- reportgenerator -reports:"**/coverage.cobertura.xml" -reporttypes:SonarQube -targetdir:"coveragereport"
- dotnet publish webAPI.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release
- dotnet sonarscanner end /d:sonar.login=$${PLUGIN_SONAR_TOKEN}
depends_on: [tests]
- name: generate-and-deploy-docs

Loading…
Cancel
Save