From 6565c1529491a1add9bea916110624190ff3da9a Mon Sep 17 00:00:00 2001 From: Leni BEAULATON Date: Thu, 3 Apr 2025 10:13:45 +0200 Subject: [PATCH 01/17] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'README.md'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7cf3392..9cfbdf7 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ ### Paquets -NSwag.AspNetCore
-Moq +- NSwag.AspNetCore
+- Moq 🟨 En cours / ✅ Fait / ❌ Pas fait From 510bcecf3ca2c7521681117b645460c93b17d738 Mon Sep 17 00:00:00 2001 From: Leni BEAULATON Date: Thu, 3 Apr 2025 10:17:00 +0200 Subject: [PATCH 02/17] =?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 | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/.drone.yml b/.drone.yml index 894663d..4362663 100644 --- a/.drone.yml +++ b/.drone.yml @@ -44,33 +44,7 @@ volumes: - name: doc temp: {} - -steps: - - name: retore & build - image: mcr.microsoft.com/dotnet/sdk:8.0 - commands: - - dotnet build --configuration Release - depend_on: [clone] - - - name: test - image: mcr.microsoft.com/dotnet/sdk:8.0 - commands: - - dotnet test - depends_on: [retore & build] - - - name: generate doc - image: mcr.microsoft.com/dotnet/sdk:8.0 - volumes: - - name: doc - path: /doc - commands: - - dotnet new tool-manifest - - dotnet tool install NSwag.ConsoleCore - - dotnet restore - - cd WF_EF_Api/WfApi - - dotnet nswag aspnetcore2openapi /output:/doc/swagger.json - depends_on: [clone, retore & build] - + #- name: code-inspection # image: hub.codefirst.iut.uca.fr/marc.chevaldonne:codefirs-dronsonarplugin-dotnet8 # secret: [SECRET_SONAR_LOGIN] From 1468acc9f96ee628191576577d3c60d7ad3be593 Mon Sep 17 00:00:00 2001 From: Leni BEAULATON Date: Thu, 3 Apr 2025 10:18:06 +0200 Subject: [PATCH 03/17] =?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 | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 4362663..894663d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -44,7 +44,33 @@ volumes: - name: doc temp: {} - + +steps: + - name: retore & build + image: mcr.microsoft.com/dotnet/sdk:8.0 + commands: + - dotnet build --configuration Release + depend_on: [clone] + + - name: test + image: mcr.microsoft.com/dotnet/sdk:8.0 + commands: + - dotnet test + depends_on: [retore & build] + + - name: generate doc + image: mcr.microsoft.com/dotnet/sdk:8.0 + volumes: + - name: doc + path: /doc + commands: + - dotnet new tool-manifest + - dotnet tool install NSwag.ConsoleCore + - dotnet restore + - cd WF_EF_Api/WfApi + - dotnet nswag aspnetcore2openapi /output:/doc/swagger.json + depends_on: [clone, retore & build] + #- name: code-inspection # image: hub.codefirst.iut.uca.fr/marc.chevaldonne:codefirs-dronsonarplugin-dotnet8 # secret: [SECRET_SONAR_LOGIN] From 9437cc9fdd65878af9437945ccd074fa34102c5b Mon Sep 17 00:00:00 2001 From: Leni BEAULATON Date: Thu, 3 Apr 2025 10:18:38 +0200 Subject: [PATCH 04/17] =?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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 894663d..1e1bd78 100644 --- a/.drone.yml +++ b/.drone.yml @@ -49,7 +49,7 @@ steps: - name: retore & build image: mcr.microsoft.com/dotnet/sdk:8.0 commands: - - dotnet build --configuration Release + - dotnet build WF_EF_Api/WF_EF_Api.sln --configuration Release depend_on: [clone] - name: test From 811ec76c4972360c242ef71e6078b4881a3591b9 Mon Sep 17 00:00:00 2001 From: Leni BEAULATON Date: Thu, 3 Apr 2025 10:27:19 +0200 Subject: [PATCH 05/17] =?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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 1e1bd78..e8849bd 100644 --- a/.drone.yml +++ b/.drone.yml @@ -55,7 +55,7 @@ steps: - name: test image: mcr.microsoft.com/dotnet/sdk:8.0 commands: - - dotnet test + - dotnet test WF_EF_Api/XUnitTest/XUnitTest.csproj depends_on: [retore & build] - name: generate doc From 24e18ae4018d22359baaaaeec6d572d32553dc25 Mon Sep 17 00:00:00 2001 From: Leni BEAULATON Date: Thu, 3 Apr 2025 10:29:53 +0200 Subject: [PATCH 06/17] =?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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index e8849bd..cab80f0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -66,7 +66,7 @@ steps: commands: - dotnet new tool-manifest - dotnet tool install NSwag.ConsoleCore - - dotnet restore + - dotnet restore WF_EF_Api/WF_EF_Api.sln - cd WF_EF_Api/WfApi - dotnet nswag aspnetcore2openapi /output:/doc/swagger.json depends_on: [clone, retore & build] From 6947bc017a7728320437bb276333854184ce90cb Mon Sep 17 00:00:00 2001 From: Leni BEAULATON Date: Thu, 3 Apr 2025 10:42:49 +0200 Subject: [PATCH 07/17] Maj Yam --- WF_EF_Api/ConsoleTest/ConsoleTest.csproj | 1 + WF_EF_Api/Contextlib/Contextlib.csproj | 1 + WF_EF_Api/DTO/DTO.csproj | 1 + WF_EF_Api/Dto2Entities/Dto2Entities.csproj | 1 + WF_EF_Api/Entity/Entity.csproj | 1 + WF_EF_Api/ServicesApi/ServicesApi.csproj | 1 + WF_EF_Api/Shared/Shared.csproj | 1 + WF_EF_Api/StubApi/StubApi.csproj | 1 + WF_EF_Api/StubbedContextLib/StubbedContextLib.csproj | 1 + WF_EF_Api/TestModel2Entities/TestModel2Entities.csproj | 1 + WF_EF_Api/WfApi/WfApi.csproj | 1 + WF_EF_Api/XUnitTest/XUnitTest.csproj | 1 + 12 files changed, 12 insertions(+) diff --git a/WF_EF_Api/ConsoleTest/ConsoleTest.csproj b/WF_EF_Api/ConsoleTest/ConsoleTest.csproj index ab5c068..7c9fea5 100644 --- a/WF_EF_Api/ConsoleTest/ConsoleTest.csproj +++ b/WF_EF_Api/ConsoleTest/ConsoleTest.csproj @@ -14,6 +14,7 @@ + diff --git a/WF_EF_Api/Contextlib/Contextlib.csproj b/WF_EF_Api/Contextlib/Contextlib.csproj index 71fb706..fab75f7 100644 --- a/WF_EF_Api/Contextlib/Contextlib.csproj +++ b/WF_EF_Api/Contextlib/Contextlib.csproj @@ -20,6 +20,7 @@ + diff --git a/WF_EF_Api/DTO/DTO.csproj b/WF_EF_Api/DTO/DTO.csproj index eb07bc3..5730eb1 100644 --- a/WF_EF_Api/DTO/DTO.csproj +++ b/WF_EF_Api/DTO/DTO.csproj @@ -12,6 +12,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/WF_EF_Api/Dto2Entities/Dto2Entities.csproj b/WF_EF_Api/Dto2Entities/Dto2Entities.csproj index 878498d..21abe08 100644 --- a/WF_EF_Api/Dto2Entities/Dto2Entities.csproj +++ b/WF_EF_Api/Dto2Entities/Dto2Entities.csproj @@ -12,6 +12,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/WF_EF_Api/Entity/Entity.csproj b/WF_EF_Api/Entity/Entity.csproj index eb07bc3..5730eb1 100644 --- a/WF_EF_Api/Entity/Entity.csproj +++ b/WF_EF_Api/Entity/Entity.csproj @@ -12,6 +12,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/WF_EF_Api/ServicesApi/ServicesApi.csproj b/WF_EF_Api/ServicesApi/ServicesApi.csproj index c9b2ead..ba9b339 100644 --- a/WF_EF_Api/ServicesApi/ServicesApi.csproj +++ b/WF_EF_Api/ServicesApi/ServicesApi.csproj @@ -12,6 +12,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/WF_EF_Api/Shared/Shared.csproj b/WF_EF_Api/Shared/Shared.csproj index eb07bc3..5730eb1 100644 --- a/WF_EF_Api/Shared/Shared.csproj +++ b/WF_EF_Api/Shared/Shared.csproj @@ -12,6 +12,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/WF_EF_Api/StubApi/StubApi.csproj b/WF_EF_Api/StubApi/StubApi.csproj index b52caac..20bf6df 100644 --- a/WF_EF_Api/StubApi/StubApi.csproj +++ b/WF_EF_Api/StubApi/StubApi.csproj @@ -12,6 +12,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/WF_EF_Api/StubbedContextLib/StubbedContextLib.csproj b/WF_EF_Api/StubbedContextLib/StubbedContextLib.csproj index d1ff57b..bea0bb0 100644 --- a/WF_EF_Api/StubbedContextLib/StubbedContextLib.csproj +++ b/WF_EF_Api/StubbedContextLib/StubbedContextLib.csproj @@ -12,6 +12,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/WF_EF_Api/TestModel2Entities/TestModel2Entities.csproj b/WF_EF_Api/TestModel2Entities/TestModel2Entities.csproj index eb07bc3..5730eb1 100644 --- a/WF_EF_Api/TestModel2Entities/TestModel2Entities.csproj +++ b/WF_EF_Api/TestModel2Entities/TestModel2Entities.csproj @@ -12,6 +12,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/WF_EF_Api/WfApi/WfApi.csproj b/WF_EF_Api/WfApi/WfApi.csproj index 8f836d0..dfd1d51 100644 --- a/WF_EF_Api/WfApi/WfApi.csproj +++ b/WF_EF_Api/WfApi/WfApi.csproj @@ -18,6 +18,7 @@ + diff --git a/WF_EF_Api/XUnitTest/XUnitTest.csproj b/WF_EF_Api/XUnitTest/XUnitTest.csproj index 6fb9876..55748cf 100644 --- a/WF_EF_Api/XUnitTest/XUnitTest.csproj +++ b/WF_EF_Api/XUnitTest/XUnitTest.csproj @@ -19,6 +19,7 @@ + From 79bec0a5d89f1030bed7cc3d3a62033c4052e8df Mon Sep 17 00:00:00 2001 From: Leni BEAULATON Date: Thu, 3 Apr 2025 10:45:54 +0200 Subject: [PATCH 08/17] Maj NSwag.Generation.AspNetCore --- WF_EF_Api/ConsoleTest/ConsoleTest.csproj | 1 + WF_EF_Api/Contextlib/Contextlib.csproj | 1 + WF_EF_Api/DTO/DTO.csproj | 1 + WF_EF_Api/Dto2Entities/Dto2Entities.csproj | 1 + WF_EF_Api/Entity/Entity.csproj | 1 + WF_EF_Api/ServicesApi/ServicesApi.csproj | 1 + WF_EF_Api/Shared/Shared.csproj | 1 + WF_EF_Api/StubApi/StubApi.csproj | 1 + WF_EF_Api/StubbedContextLib/StubbedContextLib.csproj | 1 + WF_EF_Api/TestModel2Entities/TestModel2Entities.csproj | 1 + WF_EF_Api/WfApi/WfApi.csproj | 1 + WF_EF_Api/XUnitTest/XUnitTest.csproj | 1 + 12 files changed, 12 insertions(+) diff --git a/WF_EF_Api/ConsoleTest/ConsoleTest.csproj b/WF_EF_Api/ConsoleTest/ConsoleTest.csproj index 7c9fea5..37f343b 100644 --- a/WF_EF_Api/ConsoleTest/ConsoleTest.csproj +++ b/WF_EF_Api/ConsoleTest/ConsoleTest.csproj @@ -15,6 +15,7 @@ + diff --git a/WF_EF_Api/Contextlib/Contextlib.csproj b/WF_EF_Api/Contextlib/Contextlib.csproj index fab75f7..e901b0b 100644 --- a/WF_EF_Api/Contextlib/Contextlib.csproj +++ b/WF_EF_Api/Contextlib/Contextlib.csproj @@ -21,6 +21,7 @@ + diff --git a/WF_EF_Api/DTO/DTO.csproj b/WF_EF_Api/DTO/DTO.csproj index 5730eb1..d141848 100644 --- a/WF_EF_Api/DTO/DTO.csproj +++ b/WF_EF_Api/DTO/DTO.csproj @@ -13,6 +13,7 @@ + diff --git a/WF_EF_Api/Dto2Entities/Dto2Entities.csproj b/WF_EF_Api/Dto2Entities/Dto2Entities.csproj index 21abe08..4bed57b 100644 --- a/WF_EF_Api/Dto2Entities/Dto2Entities.csproj +++ b/WF_EF_Api/Dto2Entities/Dto2Entities.csproj @@ -13,6 +13,7 @@ + diff --git a/WF_EF_Api/Entity/Entity.csproj b/WF_EF_Api/Entity/Entity.csproj index 5730eb1..d141848 100644 --- a/WF_EF_Api/Entity/Entity.csproj +++ b/WF_EF_Api/Entity/Entity.csproj @@ -13,6 +13,7 @@ + diff --git a/WF_EF_Api/ServicesApi/ServicesApi.csproj b/WF_EF_Api/ServicesApi/ServicesApi.csproj index ba9b339..382fb88 100644 --- a/WF_EF_Api/ServicesApi/ServicesApi.csproj +++ b/WF_EF_Api/ServicesApi/ServicesApi.csproj @@ -13,6 +13,7 @@ + diff --git a/WF_EF_Api/Shared/Shared.csproj b/WF_EF_Api/Shared/Shared.csproj index 5730eb1..d141848 100644 --- a/WF_EF_Api/Shared/Shared.csproj +++ b/WF_EF_Api/Shared/Shared.csproj @@ -13,6 +13,7 @@ + diff --git a/WF_EF_Api/StubApi/StubApi.csproj b/WF_EF_Api/StubApi/StubApi.csproj index 20bf6df..830978e 100644 --- a/WF_EF_Api/StubApi/StubApi.csproj +++ b/WF_EF_Api/StubApi/StubApi.csproj @@ -13,6 +13,7 @@ + diff --git a/WF_EF_Api/StubbedContextLib/StubbedContextLib.csproj b/WF_EF_Api/StubbedContextLib/StubbedContextLib.csproj index bea0bb0..0b9f2af 100644 --- a/WF_EF_Api/StubbedContextLib/StubbedContextLib.csproj +++ b/WF_EF_Api/StubbedContextLib/StubbedContextLib.csproj @@ -13,6 +13,7 @@ + diff --git a/WF_EF_Api/TestModel2Entities/TestModel2Entities.csproj b/WF_EF_Api/TestModel2Entities/TestModel2Entities.csproj index 5730eb1..d141848 100644 --- a/WF_EF_Api/TestModel2Entities/TestModel2Entities.csproj +++ b/WF_EF_Api/TestModel2Entities/TestModel2Entities.csproj @@ -13,6 +13,7 @@ + diff --git a/WF_EF_Api/WfApi/WfApi.csproj b/WF_EF_Api/WfApi/WfApi.csproj index dfd1d51..45cbb0a 100644 --- a/WF_EF_Api/WfApi/WfApi.csproj +++ b/WF_EF_Api/WfApi/WfApi.csproj @@ -19,6 +19,7 @@ + diff --git a/WF_EF_Api/XUnitTest/XUnitTest.csproj b/WF_EF_Api/XUnitTest/XUnitTest.csproj index 55748cf..ecb5e73 100644 --- a/WF_EF_Api/XUnitTest/XUnitTest.csproj +++ b/WF_EF_Api/XUnitTest/XUnitTest.csproj @@ -20,6 +20,7 @@ + From e0fad88de1d3eea88b94e534037a535147b57712 Mon Sep 17 00:00:00 2001 From: Leni BEAULATON Date: Thu, 3 Apr 2025 10:47:23 +0200 Subject: [PATCH 09/17] =?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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index cab80f0..14d2526 100644 --- a/.drone.yml +++ b/.drone.yml @@ -78,5 +78,5 @@ steps: - name: publish image: mcr.microsoft.com/dotnet/sdk:8.0 commands: - - dotnet publish -c Release -o out + - dotnet publish WF_EF_Api/WfApi/WfApi.csproj -c Release -o out depends_on: [retore & build, test] \ No newline at end of file From 100c31b5ff3bf25af29a675347a3abc54552a77e Mon Sep 17 00:00:00 2001 From: Kentin BRONGNIART Date: Thu, 3 Apr 2025 10:59:55 +0200 Subject: [PATCH 10/17] =?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 | 124 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 119 insertions(+), 5 deletions(-) diff --git a/.drone.yml b/.drone.yml index 14d2526..8998d5c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -5,10 +5,16 @@ name: CI_ApiPm trigger: event: - push + - pull_request + - tag branch: exclude: - master +volumes: + - name: docs + temp: {} + steps: - name: retore & build image: mcr.microsoft.com/dotnet/sdk:8.0 @@ -71,12 +77,120 @@ steps: - dotnet nswag aspnetcore2openapi /output:/doc/swagger.json depends_on: [clone, retore & build] - #- name: code-inspection - # image: hub.codefirst.iut.uca.fr/marc.chevaldonne:codefirs-dronsonarplugin-dotnet8 - # secret: [SECRET_SONAR_LOGIN] - # A FINIR + - name: code-inspection + image: hub.codefirst.iut.uca.fr/marc.chevaldonne:codefirs-dronsonarplugin-dotnet8 + secret: [SECRET_SONAR_LOGIN] + environment: + sonar_host: https://codefirst.iut.uca.fr/sonar/ + sonar_token: + from_secret: SECRET_SONAR_LOGIN + project_key: wtf-service + commands: + - dotnet restore WF_EF_Api/WF_EF_Api.sln + - dotnet sonarscanner begin /k:$${project_key} /d:sonar.host.url=$${sonar_host} /d:sonar.coverageReportPaths="coveragereport/SonarQube.xml" /d:sonar.login=$${sonar_token} + - dotnet build WF_EF_Api/WF_EF_Api.sln + - dotnet test WF_EF_Api/XUnitTest/XUnitTest.csproj --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage" + - reportgenerator -reports:"**/coverage.cobertura.xml" -reporttypes:SonarQube -targetdir:"coveragereport" + - dotnet sonarscanner end /d:sonar.login=$${sonar_token} + depends_on: [test] + + + - name: publish image: mcr.microsoft.com/dotnet/sdk:8.0 commands: - dotnet publish WF_EF_Api/WfApi/WfApi.csproj -c Release -o out - depends_on: [retore & build, test] \ No newline at end of file + depends_on: [retore & build, test] + + + +- name: deploy-api-db + image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest + environment: + IMAGENAME: postgres:16.8-alpine3.20 + CONTAINERNAME: wtf-api + COMMAND: create + PRIVATE: true + #OVERWRITE: true + CODEFIRST_CLIENTDRONE_ENV_POSTGRES_PASSWORD: + from_secret: POSTGRES_PASSWORD_API + CODEFIRST_CLIENTDRONE_ENV_POSTGRES_USER: + from_secret: POSTGRES_USER_API + CODEFIRST_CLIENTDRONE_ENV_POSTGRES_DB: + from_secret: POSTGRES_DB_API + ADMINS: kentinbrongniart,lenibeaulaton + + - name: deploy-auth-db + image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest + environment: + IMAGENAME: postgres:16.8-alpine3.20 + CONTAINERNAME: wtf-api-auth + COMMAND: create + PRIVATE: true + #OVERWRITE: true + CODEFIRST_CLIENTDRONE_ENV_POSTGRES_PASSWORD: + from_secret: POSTGRES_PASSWORD_AUTH + CODEFIRST_CLIENTDRONE_ENV_POSTGRES_USER: + from_secret: POSTGRES_USER_AUTH + CODEFIRST_CLIENTDRONE_ENV_POSTGRES_DB: + from_secret: POSTGRES_DB_AUTH + ADMINS: kentinbrongniart,lenibeaulaton + + + - name: deploy-test-db + image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest + environment: + IMAGENAME: postgres:16.8-alpine3.20 + CONTAINERNAME: wtf-api-test + COMMAND: create + PRIVATE: true + #OVERWRITE: true + CODEFIRST_CLIENTDRONE_ENV_POSTGRES_PASSWORD: "test" + CODEFIRST_CLIENTDRONE_ENV_POSTGRES_USER: "test" + CODEFIRST_CLIENTDRONE_ENV_POSTGRES_DB: "wtf-test" + ADMINS: kentinbrongniart,lenibeaulaton + + - name: publish-to-registry + image: plugins/docker + settings: + dockerfile: src/Dockerfile + context: src/ + registry: hub.codefirst.iut.uca.fr + repo: hub.codefirst.iut.uca.fr/WhatTheFantasy/WF-PmAPI + username: + from_secret: SECRET_REGISTRY_USERNAME + password: + from_secret: SECRET_REGISTRY_PASSWORD + depends_on: [restore & build, test, code-inspection, publish] + + + - name: deploy-container + image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest + environment: + IMAGENAME: hub.codefirst.iut.uca.fr/WhatTheFantasy/WF-PmAPI:latest + CONTAINERNAME: web-services + COMMAND: create + OVERWRITE: true + CODEFIRST_CLIENTDRONE_ENV_DB_SERVER_API: "SAE-WHAT-THE-FANTASY-wtf-api" + CODEFIRST_CLIENTDRONE_ENV_DB_USER_API: + from_secret: POSTGRES_USER_API + CODEFIRST_CLIENTDRONE_ENV_DB_PASSWORD_API: + from_secret: POSTGRES_PASSWORD_API + CODEFIRST_CLIENTDRONE_ENV_DB_DATABASE_API: + from_secret: POSTGRES_DB_API + CODEFIRST_CLIENTDRONE_ENV_DB_SERVER_AUTH: "SAE-WHAT-THE-FANTASY-wtf-api-auth" + CODEFIRST_CLIENTDRONE_ENV_DB_USER_AUTH: + from_secret: POSTGRES_USER_AUTH + CODEFIRST_CLIENTDRONE_ENV_DB_PASSWORD_AUTH: + from_secret: POSTGRES_PASSWORD_AUTH + CODEFIRST_CLIENTDRONE_ENV_DB_DATABASE_AUTH: + from_secret: POSTGRES_DB_AUTH + CODEFIRST_CLIENTDRONE_ENV_DB_SERVER_API_TEST: "SAE-WHAT-THE-FANTASY-wtf-api" + CODEFIRST_CLIENTDRONE_ENV_DB_USER_API_TEST: "test" + CODEFIRST_CLIENTDRONE_ENV_DB_PASSWORD_API_TEST: "test" + CODEFIRST_CLIENTDRONE_ENV_DB_DATABASE_API_TEST: "wtf-db-test" + ADMINS: kentinbrongniart,lenibeaulaton + depends_on: [restore & build, test, code-inspection, publish, publish-to-registry] + + + From 4506406e46d9b0b6e33c79437758ecfdce831a34 Mon Sep 17 00:00:00 2001 From: Leni BEAULATON Date: Thu, 3 Apr 2025 11:02:21 +0200 Subject: [PATCH 11/17] =?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 | 46 +++++++++++++++++----------------------------- 1 file changed, 17 insertions(+), 29 deletions(-) diff --git a/.drone.yml b/.drone.yml index 8998d5c..7750e5a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -16,24 +16,24 @@ volumes: temp: {} steps: - - name: retore & build + - name: restore & build image: mcr.microsoft.com/dotnet/sdk:8.0 commands: - dotnet build WF_EF_Api/WF_EF_Api.sln --configuration Release - depend_on: [clone] + depends_on: [clone] - name: test image: mcr.microsoft.com/dotnet/sdk:8.0 commands: - dotnet test WF_EF_Api/XUnitTest/XUnitTest.csproj - depends_on: [retore & build] - + depends_on: [restore & build] + - name: publish image: mcr.microsoft.com/dotnet/sdk:8.0 commands: - dotnet publish WF_EF_Api/WfApi/WfApi.csproj -c Release -o out - depends_on: [retore & build, test] - + depends_on: [restore & build, test] + --- kind: pipeline @@ -50,19 +50,18 @@ volumes: - name: doc temp: {} - steps: - - name: retore & build + - name: restore & build image: mcr.microsoft.com/dotnet/sdk:8.0 commands: - dotnet build WF_EF_Api/WF_EF_Api.sln --configuration Release - depend_on: [clone] + depends_on: [clone] - name: test image: mcr.microsoft.com/dotnet/sdk:8.0 commands: - dotnet test WF_EF_Api/XUnitTest/XUnitTest.csproj - depends_on: [retore & build] + depends_on: [restore & build] - name: generate doc image: mcr.microsoft.com/dotnet/sdk:8.0 @@ -75,14 +74,15 @@ steps: - dotnet restore WF_EF_Api/WF_EF_Api.sln - cd WF_EF_Api/WfApi - dotnet nswag aspnetcore2openapi /output:/doc/swagger.json - depends_on: [clone, retore & build] - + depends_on: [clone, restore & build] + - name: code-inspection image: hub.codefirst.iut.uca.fr/marc.chevaldonne:codefirs-dronsonarplugin-dotnet8 - secret: [SECRET_SONAR_LOGIN] + secrets: + - SECRET_SONAR_LOGIN environment: sonar_host: https://codefirst.iut.uca.fr/sonar/ - sonar_token: + sonar_token: from_secret: SECRET_SONAR_LOGIN project_key: wtf-service commands: @@ -94,24 +94,19 @@ steps: - dotnet sonarscanner end /d:sonar.login=$${sonar_token} depends_on: [test] - - - name: publish image: mcr.microsoft.com/dotnet/sdk:8.0 commands: - dotnet publish WF_EF_Api/WfApi/WfApi.csproj -c Release -o out - depends_on: [retore & build, test] - + depends_on: [restore & build, test] - -- name: deploy-api-db + - name: deploy-api-db image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest environment: IMAGENAME: postgres:16.8-alpine3.20 CONTAINERNAME: wtf-api COMMAND: create PRIVATE: true - #OVERWRITE: true CODEFIRST_CLIENTDRONE_ENV_POSTGRES_PASSWORD: from_secret: POSTGRES_PASSWORD_API CODEFIRST_CLIENTDRONE_ENV_POSTGRES_USER: @@ -119,7 +114,7 @@ steps: CODEFIRST_CLIENTDRONE_ENV_POSTGRES_DB: from_secret: POSTGRES_DB_API ADMINS: kentinbrongniart,lenibeaulaton - + - name: deploy-auth-db image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest environment: @@ -127,7 +122,6 @@ steps: CONTAINERNAME: wtf-api-auth COMMAND: create PRIVATE: true - #OVERWRITE: true CODEFIRST_CLIENTDRONE_ENV_POSTGRES_PASSWORD: from_secret: POSTGRES_PASSWORD_AUTH CODEFIRST_CLIENTDRONE_ENV_POSTGRES_USER: @@ -136,7 +130,6 @@ steps: from_secret: POSTGRES_DB_AUTH ADMINS: kentinbrongniart,lenibeaulaton - - name: deploy-test-db image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest environment: @@ -144,7 +137,6 @@ steps: CONTAINERNAME: wtf-api-test COMMAND: create PRIVATE: true - #OVERWRITE: true CODEFIRST_CLIENTDRONE_ENV_POSTGRES_PASSWORD: "test" CODEFIRST_CLIENTDRONE_ENV_POSTGRES_USER: "test" CODEFIRST_CLIENTDRONE_ENV_POSTGRES_DB: "wtf-test" @@ -163,7 +155,6 @@ steps: from_secret: SECRET_REGISTRY_PASSWORD depends_on: [restore & build, test, code-inspection, publish] - - name: deploy-container image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest environment: @@ -191,6 +182,3 @@ steps: CODEFIRST_CLIENTDRONE_ENV_DB_DATABASE_API_TEST: "wtf-db-test" ADMINS: kentinbrongniart,lenibeaulaton depends_on: [restore & build, test, code-inspection, publish, publish-to-registry] - - - From ccb8b0295b96ddcf268aa436e6700a00825f866a Mon Sep 17 00:00:00 2001 From: Kentin BRONGNIART Date: Thu, 3 Apr 2025 11:11:40 +0200 Subject: [PATCH 12/17] =?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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 7750e5a..3593147 100644 --- a/.drone.yml +++ b/.drone.yml @@ -91,7 +91,7 @@ steps: - dotnet build WF_EF_Api/WF_EF_Api.sln - dotnet test WF_EF_Api/XUnitTest/XUnitTest.csproj --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage" - reportgenerator -reports:"**/coverage.cobertura.xml" -reporttypes:SonarQube -targetdir:"coveragereport" - - dotnet sonarscanner end /d:sonar.login=$${sonar_token} + - dotnet sonarscanner end /d:sonar.login=$${sonar_token_wtf} depends_on: [test] - name: publish From 6016183450b40bd4f037953dc921c3aa2a5cc346 Mon Sep 17 00:00:00 2001 From: Kentin BRONGNIART Date: Thu, 3 Apr 2025 11:21:50 +0200 Subject: [PATCH 13/17] =?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 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 3593147..c73bee5 100644 --- a/.drone.yml +++ b/.drone.yml @@ -77,9 +77,8 @@ steps: depends_on: [clone, restore & build] - name: code-inspection - image: hub.codefirst.iut.uca.fr/marc.chevaldonne:codefirs-dronsonarplugin-dotnet8 - secrets: - - SECRET_SONAR_LOGIN + image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dronesonarplugin-dotnet7-maui + secrets: [ SECRET_SONAR_LOGIN ] environment: sonar_host: https://codefirst.iut.uca.fr/sonar/ sonar_token: @@ -88,7 +87,7 @@ steps: commands: - dotnet restore WF_EF_Api/WF_EF_Api.sln - dotnet sonarscanner begin /k:$${project_key} /d:sonar.host.url=$${sonar_host} /d:sonar.coverageReportPaths="coveragereport/SonarQube.xml" /d:sonar.login=$${sonar_token} - - dotnet build WF_EF_Api/WF_EF_Api.sln + - dotnet build WF_EF_Api/WF_EF_Api.sln -c Release --no-restore - dotnet test WF_EF_Api/XUnitTest/XUnitTest.csproj --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage" - reportgenerator -reports:"**/coverage.cobertura.xml" -reporttypes:SonarQube -targetdir:"coveragereport" - dotnet sonarscanner end /d:sonar.login=$${sonar_token_wtf} From 5759828abaf300eb0e57b7982f57775c0c1fd5c8 Mon Sep 17 00:00:00 2001 From: Kentin BRONGNIART Date: Thu, 3 Apr 2025 11:25:30 +0200 Subject: [PATCH 14/17] =?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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index c73bee5..19bbc53 100644 --- a/.drone.yml +++ b/.drone.yml @@ -77,7 +77,7 @@ steps: depends_on: [clone, restore & build] - name: code-inspection - image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dronesonarplugin-dotnet7-maui + image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dronesonarplugin-dotnet8 secrets: [ SECRET_SONAR_LOGIN ] environment: sonar_host: https://codefirst.iut.uca.fr/sonar/ From 75fe8de4d3bb089361a2e063fc4e23bc32132cf0 Mon Sep 17 00:00:00 2001 From: Kentin BRONGNIART Date: Thu, 3 Apr 2025 11:31:24 +0200 Subject: [PATCH 15/17] =?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 | 1 + 1 file changed, 1 insertion(+) diff --git a/.drone.yml b/.drone.yml index 19bbc53..8799752 100644 --- a/.drone.yml +++ b/.drone.yml @@ -72,6 +72,7 @@ steps: - dotnet new tool-manifest - dotnet tool install NSwag.ConsoleCore - dotnet restore WF_EF_Api/WF_EF_Api.sln + - dotnet clean WF_EF_Api/WfApi/WfApi.csproj - cd WF_EF_Api/WfApi - dotnet nswag aspnetcore2openapi /output:/doc/swagger.json depends_on: [clone, restore & build] From 3a30c7972b79c8e587fd9b33aef4043de5cee64f Mon Sep 17 00:00:00 2001 From: Kentin BRONGNIART Date: Thu, 3 Apr 2025 11:35:53 +0200 Subject: [PATCH 16/17] =?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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 8799752..865d564 100644 --- a/.drone.yml +++ b/.drone.yml @@ -75,7 +75,7 @@ steps: - dotnet clean WF_EF_Api/WfApi/WfApi.csproj - cd WF_EF_Api/WfApi - dotnet nswag aspnetcore2openapi /output:/doc/swagger.json - depends_on: [clone, restore & build] + depends_on: [clone, restore & build,test] - name: code-inspection image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dronesonarplugin-dotnet8 From 3e7ae2af122aae124c5f1bd9def0157097d32b56 Mon Sep 17 00:00:00 2001 From: Kentin BRONGNIART Date: Thu, 3 Apr 2025 11:44:25 +0200 Subject: [PATCH 17/17] =?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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 865d564..7fc23c9 100644 --- a/.drone.yml +++ b/.drone.yml @@ -82,12 +82,12 @@ steps: secrets: [ SECRET_SONAR_LOGIN ] environment: sonar_host: https://codefirst.iut.uca.fr/sonar/ - sonar_token: + sonar_token_wtf: from_secret: SECRET_SONAR_LOGIN project_key: wtf-service commands: - dotnet restore WF_EF_Api/WF_EF_Api.sln - - dotnet sonarscanner begin /k:$${project_key} /d:sonar.host.url=$${sonar_host} /d:sonar.coverageReportPaths="coveragereport/SonarQube.xml" /d:sonar.login=$${sonar_token} + - dotnet sonarscanner begin /k:$${project_key} /d:sonar.host.url=$${sonar_host} /d:sonar.coverageReportPaths="coveragereport/SonarQube.xml" /d:sonar.login=$${sonar_token_wtf} - dotnet build WF_EF_Api/WF_EF_Api.sln -c Release --no-restore - dotnet test WF_EF_Api/XUnitTest/XUnitTest.csproj --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage" - reportgenerator -reports:"**/coverage.cobertura.xml" -reporttypes:SonarQube -targetdir:"coveragereport"