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