diff --git a/.drone.yml b/.drone.yml index 7bf0bdd..2a60a10 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,47 +7,35 @@ trigger: - push steps: - # - name: build - # image: mcr.microsoft.com/dotnet/sdk:7.0 - # volumes: - # - name: docs - # path: /docs - # commands: - # - cd MCTG/ - # - dotnet restore CI-CD.sln - # - dotnet build CI-CD.sln -c Release --no-restore - # - dotnet publish CI-CD.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release - - name: build - image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dotnet7-maui:latest + image: mcr.microsoft.com/dotnet/sdk:7.0 + volumes: + - name: docs + path: /docs commands: - cd MCTG/ - dotnet restore SAE-2.01.sln - - dotnet build SAE-2.01.sln -c Release --no-restore /p:AndroidSdkDirectory=$ANDROID_SDK_ROOT -property:Aapt2ToolPath=$ANDROID_SDK_ROOT/build-tools/33.0.0 - - dotnet publish MCTGApp/MCTGApp.csproj -c Release --no-restore -o CI_PROJECT_DIR/build/release - - dotnet publish Views/Views.csproj -c Release --no-restore -o $CI_PROJECT_DIR/build/release -f:net7.0-android /p:AndroidSdkDirectory=/usr/lib/android-sdk + - dotnet build SAE-2.01.sln -c Release --no-restore + - dotnet publish SAE-2.01.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release - name: tests - image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dotnet7-maui:latest + image: mcr.microsoft.com/dotnet/sdk:7.0 commands: - cd MCTG/ - dotnet restore SAE-2.01.sln - - dotnet test SAE-2.01.sln --no-restore /p:AndroidSdkDirectory=$ANDROID_SDK_ROOT -property:Aapt2ToolPath=$ANDROID_SDK_ROOT/build-tools/33.0.0 + - dotnet test SAE-2.01.sln --no-restore depends_on: [ build ] - name: code-analysis image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dronesonarplugin-dotnet7 commands: - cd MCTG/ - - cp SAE-2.01.sln CI.sln - - sed -i '30,35d' CI.sln - - sed -i '10,11d' CI.sln - - dotnet restore CI.sln + - dotnet restore SAE-2.01.sln - dotnet sonarscanner begin /k:SAE-2.01 /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 CI.sln -c Release --no-restore - - dotnet test CI.sln --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage" + - dotnet build SAE-2.01.sln -c Release --no-restore + - dotnet test SAE-2.01.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 CI.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release + - dotnet publish SAE-2.01.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release - dotnet sonarscanner end /d:sonar.login=$${PLUGIN_SONAR_TOKEN} secrets: [ SECRET_SONAR_LOGIN ] settings: