From bb3a57100c70e304505b26031de5e9b287191ca9 Mon Sep 17 00:00:00 2001 From: Maxence LANONE Date: Mon, 30 Jan 2023 14:36:41 +0100 Subject: [PATCH 1/2] Ajouter '.drone.yml' --- .drone.yml | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..578a2e0 --- /dev/null +++ b/.drone.yml @@ -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: {} \ No newline at end of file From 7ad094cf221475d9b03eaff6b790bfd87cfdaa6d Mon Sep 17 00:00:00 2001 From: Maxence LANONE Date: Tue, 31 Jan 2023 23:21:13 +0100 Subject: [PATCH 2/2] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/.drone.yml b/.drone.yml index 578a2e0..6641f69 100644 --- a/.drone.yml +++ b/.drone.yml @@ -10,30 +10,28 @@ 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 + - dotnet restore LeagueOfLegends.sln + - dotnet build LeagueOfLegends.sln -c Release --no-restore + - dotnet publish LeagueOfLegends.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release - name: tests - image: mcr.microsoft.com/dotnet/sdk:5.0 + image: mcr.microsoft.com/dotnet/sdk:7.0 commands: - - cd Solution1/ - - dotnet restore Solution1_CI.sln - - dotnet test Solution1_CI.sln --no-restore + - dotnet restore LeagueOfLegends.sln + - dotnet test LeagueOfLegends.sln --no-restore depends_on: [build] - name: code-analysis - image: pubhub.codefirst.ddns.net/thbellem/codefirst-dronesonarplugin-dotnet5 + image: pubhub.codefirst.iut.uca.fr/thbellem/codefirst-dronesonarplugin-dotnet7 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" + - dotnet restore LeagueOfLegends.sln + - dotnet sonarscanner begin /k:EfCore_Lol_S4 /d:sonar.host.url="https://codefirst.iut.uca.fr/sonar" /d:sonar.coverageReportPaths="coveragereport/SonarQube.xml" /d:sonar.login=$${PLUGIN_SONAR_TOKEN} + - dotnet build LeagueOfLegends.sln -c Release --no-restore + - dotnet test LeagueOfLegends.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 + - dotnet publish LeagueOfLegends.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: # accessible en ligne de commande par $${PLUGIN SONAR HOST} @@ -44,7 +42,7 @@ steps: depends on: [tests] - name: generate-and-deploy-docs - image: pubhub.codefirst.ddns.net/thbellem/codefirst-docdeployer + image: pubhub.codefirst.iut.uca.fr/thbellem/codefirst-docdeployer volumes: - name: docs path: /Document