Ajouter '.drone.yml'

pull/2/head
Maxence LANONE 2 years ago
parent 3865179e98
commit bb3a57100c

@ -0,0 +1,61 @@
kind: pipeline
type: docker
name: EfCore_Lol_S4
trigger:
event:
- push
steps:
- name: build
image: mcr.microsoft.com/dotnet/sdk:7.0
commands:
- cd Solution1/
- dotnet restore Solution1_CI.sln
- dotnet build Solution1_CI.sln -c Release --no-restore
- dotnet publish Solution1_CI.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release
- name: tests
image: mcr.microsoft.com/dotnet/sdk:5.0
commands:
- cd Solution1/
- dotnet restore Solution1_CI.sln
- dotnet test Solution1_CI.sln --no-restore
depends_on: [build]
- name: code-analysis
image: pubhub.codefirst.ddns.net/thbellem/codefirst-dronesonarplugin-dotnet5
commands:
- cd Solution1/
- dotnet restore Solution1_CI.sln
- dotnet sonarscanner begin /k:SpotiWish /d:sonar.host.url="https://codefirst.ddns.net/sonar" /d:sonar.coverageReportPaths="coveragereport/SonarQube.xml" /d:sonar.coverage.exclusions="ConsoleApp1/**" /d:sonar.login=sqp_c61996cc909dc985d862400d1cdf1769627dc7ac
- dotnet build Solution1_CI.sln -c Release --no-restore
- dotnet test Solution1_CI.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 Solution1_CI.sln -c Release --no-restore -o $CI_PROJECT_DIR/build/release
- dotnet sonarscanner end /d:sonar.login=sqp_c61996cc909dc985d862400d1cdf1769627dc7ac
secrets: [ SECRET_SONAR_LOGIN ]
settings:
# accessible en ligne de commande par $${PLUGIN SONAR HOST}
sonar_host: https://codefirst.ddns.net/sonar/
# accessible en ligne de commande par $${PLUGIN_SONAR_TOKEN}
sonar_token:
from_secret: SECRET_SONAR_LOGIN
depends on: [tests]
- name: generate-and-deploy-docs
image: pubhub.codefirst.ddns.net/thbellem/codefirst-docdeployer
volumes:
- name: docs
path: /Document
commands:
- cd Document/doxygen
- doxygen Doxyfile
- /entrypoint.sh
when:
branch:
- master
depends_on: [ build ]
volumes:
- name: docs
temp: {}
Loading…
Cancel
Save