Merge branch 'master' into Merge_API_EF
continuous-integration/drone/push Build is passing Details

Merge_API_EF
Kevin MONDEJAR 2 weeks ago
commit 81e18d872e

@ -5,29 +5,35 @@ name: CI_ApiPm
trigger: trigger:
event: event:
- push - push
- pull_request
- tag
branch: branch:
exclude: exclude:
- master - master
volumes:
- name: docs
temp: {}
steps: steps:
- name: retore & build - name: restore & build
image: mcr.microsoft.com/dotnet/sdk:8.0 image: mcr.microsoft.com/dotnet/sdk:8.0
commands: commands:
- dotnet build WF_EF_Api/WF_EF_Api.sln --configuration Release - dotnet build WF_EF_Api/WF_EF_Api.sln --configuration Release
depend_on: [clone] depends_on: [clone]
- name: test - name: test
image: mcr.microsoft.com/dotnet/sdk:8.0 image: mcr.microsoft.com/dotnet/sdk:8.0
commands: commands:
- dotnet test WF_EF_Api/XUnitTest/XUnitTest.csproj - dotnet test WF_EF_Api/XUnitTest/XUnitTest.csproj
depends_on: [retore & build] depends_on: [restore & build]
- name: publish - name: publish
image: mcr.microsoft.com/dotnet/sdk:8.0 image: mcr.microsoft.com/dotnet/sdk:8.0
commands: commands:
- dotnet publish WF_EF_Api/WfApi/WfApi.csproj -c Release -o out - dotnet publish WF_EF_Api/WfApi/WfApi.csproj -c Release -o out
depends_on: [retore & build, test] depends_on: [restore & build, test]
--- ---
kind: pipeline kind: pipeline
@ -44,19 +50,18 @@ volumes:
- name: doc - name: doc
temp: {} temp: {}
steps: steps:
- name: retore & build - name: restore & build
image: mcr.microsoft.com/dotnet/sdk:8.0 image: mcr.microsoft.com/dotnet/sdk:8.0
commands: commands:
- dotnet build --configuration Release - dotnet build WF_EF_Api/WF_EF_Api.sln --configuration Release
depend_on: [clone] depends_on: [clone]
- name: test - name: test
image: mcr.microsoft.com/dotnet/sdk:8.0 image: mcr.microsoft.com/dotnet/sdk:8.0
commands: commands:
- dotnet test WF_EF_Api/XUnitTest/XUnitTest.csproj - dotnet test WF_EF_Api/XUnitTest/XUnitTest.csproj
depends_on: [retore & build] depends_on: [restore & build]
- name: generate doc - name: generate doc
image: mcr.microsoft.com/dotnet/sdk:8.0 image: mcr.microsoft.com/dotnet/sdk:8.0
@ -66,17 +71,114 @@ steps:
commands: commands:
- dotnet new tool-manifest - dotnet new tool-manifest
- dotnet tool install NSwag.ConsoleCore - dotnet tool install NSwag.ConsoleCore
- dotnet restore - dotnet restore WF_EF_Api/WF_EF_Api.sln
- dotnet clean WF_EF_Api/WfApi/WfApi.csproj
- cd WF_EF_Api/WfApi - cd WF_EF_Api/WfApi
- dotnet nswag aspnetcore2openapi /output:/doc/swagger.json - dotnet nswag aspnetcore2openapi /output:/doc/swagger.json
depends_on: [clone, retore & build] depends_on: [clone, restore & build,test]
#- name: code-inspection - name: code-inspection
# image: hub.codefirst.iut.uca.fr/marc.chevaldonne:codefirs-dronsonarplugin-dotnet8 image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dronesonarplugin-dotnet8
# secret: [SECRET_SONAR_LOGIN] secrets: [ SECRET_SONAR_LOGIN ]
# A FINIR environment:
sonar_host: https://codefirst.iut.uca.fr/sonar/
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_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"
- dotnet sonarscanner end /d:sonar.login=$${sonar_token_wtf}
depends_on: [test]
- name: publish - name: publish
image: mcr.microsoft.com/dotnet/sdk:8.0 image: mcr.microsoft.com/dotnet/sdk:8.0
commands: commands:
- dotnet publish -c Release -o out - 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
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
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
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
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]

@ -2,8 +2,8 @@
### Paquets ### Paquets
NSwag.AspNetCore <br> - NSwag.AspNetCore <br>
Moq - Moq
🟨 En cours / ✅ Fait / ❌ Pas fait 🟨 En cours / ✅ Fait / ❌ Pas fait

@ -14,6 +14,8 @@
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.3" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.3" />
<PackageReference Include="NSwag.Core" Version="14.3.0" /> <PackageReference Include="NSwag.Core" Version="14.3.0" />
<PackageReference Include="NSwag.Core.Yaml" Version="14.3.0" />
<PackageReference Include="NSwag.Generation.AspNetCore" Version="14.3.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

@ -20,6 +20,8 @@
</PackageReference> </PackageReference>
<PackageReference Include="NLog" Version="5.4.0" /> <PackageReference Include="NLog" Version="5.4.0" />
<PackageReference Include="NSwag.Core" Version="14.3.0" /> <PackageReference Include="NSwag.Core" Version="14.3.0" />
<PackageReference Include="NSwag.Core.Yaml" Version="14.3.0" />
<PackageReference Include="NSwag.Generation.AspNetCore" Version="14.3.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

@ -12,6 +12,8 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="NSwag.Core" Version="14.3.0" /> <PackageReference Include="NSwag.Core" Version="14.3.0" />
<PackageReference Include="NSwag.Core.Yaml" Version="14.3.0" />
<PackageReference Include="NSwag.Generation.AspNetCore" Version="14.3.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

@ -12,6 +12,8 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="NSwag.Core" Version="14.3.0" /> <PackageReference Include="NSwag.Core" Version="14.3.0" />
<PackageReference Include="NSwag.Core.Yaml" Version="14.3.0" />
<PackageReference Include="NSwag.Generation.AspNetCore" Version="14.3.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

@ -12,6 +12,8 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="NSwag.Core" Version="14.3.0" /> <PackageReference Include="NSwag.Core" Version="14.3.0" />
<PackageReference Include="NSwag.Core.Yaml" Version="14.3.0" />
<PackageReference Include="NSwag.Generation.AspNetCore" Version="14.3.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

@ -12,6 +12,8 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="NSwag.Core" Version="14.3.0" /> <PackageReference Include="NSwag.Core" Version="14.3.0" />
<PackageReference Include="NSwag.Core.Yaml" Version="14.3.0" />
<PackageReference Include="NSwag.Generation.AspNetCore" Version="14.3.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

@ -12,6 +12,8 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="NSwag.Core" Version="14.3.0" /> <PackageReference Include="NSwag.Core" Version="14.3.0" />
<PackageReference Include="NSwag.Core.Yaml" Version="14.3.0" />
<PackageReference Include="NSwag.Generation.AspNetCore" Version="14.3.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

@ -12,6 +12,8 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="NSwag.Core" Version="14.3.0" /> <PackageReference Include="NSwag.Core" Version="14.3.0" />
<PackageReference Include="NSwag.Core.Yaml" Version="14.3.0" />
<PackageReference Include="NSwag.Generation.AspNetCore" Version="14.3.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

@ -12,6 +12,8 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="NSwag.Core" Version="14.3.0" /> <PackageReference Include="NSwag.Core" Version="14.3.0" />
<PackageReference Include="NSwag.Core.Yaml" Version="14.3.0" />
<PackageReference Include="NSwag.Generation.AspNetCore" Version="14.3.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

@ -12,6 +12,8 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="NSwag.Core" Version="14.3.0" /> <PackageReference Include="NSwag.Core" Version="14.3.0" />
<PackageReference Include="NSwag.Core.Yaml" Version="14.3.0" />
<PackageReference Include="NSwag.Generation.AspNetCore" Version="14.3.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

@ -18,6 +18,8 @@
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.6" /> <PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.6" />
<PackageReference Include="NSwag.AspNetCore" Version="14.2.0" /> <PackageReference Include="NSwag.AspNetCore" Version="14.2.0" />
<PackageReference Include="NSwag.Core" Version="14.3.0" /> <PackageReference Include="NSwag.Core" Version="14.3.0" />
<PackageReference Include="NSwag.Core.Yaml" Version="14.3.0" />
<PackageReference Include="NSwag.Generation.AspNetCore" Version="14.3.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" /> <PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
</ItemGroup> </ItemGroup>

@ -19,6 +19,8 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="Moq" Version="4.20.72" /> <PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="NSwag.Core" Version="14.3.0" /> <PackageReference Include="NSwag.Core" Version="14.3.0" />
<PackageReference Include="NSwag.Core.Yaml" Version="14.3.0" />
<PackageReference Include="NSwag.Generation.AspNetCore" Version="14.3.0" />
<PackageReference Include="xunit" Version="2.5.3" /> <PackageReference Include="xunit" Version="2.5.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3" /> <PackageReference Include="xunit.runner.visualstudio" Version="2.5.3" />
</ItemGroup> </ItemGroup>

Loading…
Cancel
Save