diff --git a/.drone.yml b/.drone.yml
index b5c4089..c253659 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -7,40 +7,78 @@ trigger:
- push
steps:
- - name: build
- image: mcr.microsoft.com/dotnet/sdk:6.0
- volumes:
- - name: docs
- path: /docs
- commands:
- - cd Sources/
- - dotnet restore Solution.sln
- - dotnet build Solution.sln -c Release --no-restore
- - dotnet publish Solution.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release
+ - name: build
+ image: mcr.microsoft.com/dotnet/sdk:6.0
+ volumes:
+ - name: docs
+ path: /docs
+ commands:
+ - cd Sources/
+ - dotnet restore Solution.sln
+ - dotnet build Solution.sln -c Release --no-restore
+ - dotnet publish Solution.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release
- - name: tests
- image: mcr.microsoft.com/dotnet/sdk:6.0
- commands:
- - cd Sources/
- - dotnet restore Solution.sln
- - dotnet test Solution.sln --no-restore
- depends_on: [build]
+ - name: tests
+ image: mcr.microsoft.com/dotnet/sdk:6.0
+ commands:
+ - cd Sources/
+ - dotnet restore Solution.sln
+ - dotnet test Solution.sln --no-restore
+ depends_on: [ build ]
- - name: generate-and-deploy-docs
- image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-docdeployer
- failure: ignore
- volumes:
- - name: docs
- path: /docs
- commands:
- #- cd Documentation/doxygen
- #- doxygen Doxyfile
- - /entrypoint.sh
- when:
- branch:
- - master
- depends_on: [ build ]
+ - name: code-analysis
+ image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dronesonarplugin-dotnet6
+ commands:
+ - cd Sources/
+ - dotnet restore Solution.sln
+ - dotnet sonarscanner begin /k:BowlingScoreApp /d:sonar.host.url=$${PLUGIN_SONAR_HOST} /d:sonar.coverageReportPaths="coveragereport/SonarQube.xml" /d:sonar.coverage.exclusions="Tests/**,BowlingApp/**,BowlingEF/**,Business/**,BowlingMaping/**,BowlingStub/**" /d:sonar.login=$${PLUGIN_SONAR_TOKEN}
+ - dotnet build Solution.sln -c Release --no-restore
+ - dotnet test Solution.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 Solution.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}
+ sonar_host: https://codefirst.iut.uca.fr/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: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-docdeployer
+ failure: ignore
+ volumes:
+ - name: docs
+ path: /docs
+ commands:
+ - cd Documentation/doxygen
+ - doxygen Doxyfile
+ - /entrypoint.sh
+ when:
+ branch:
+ - master
+ depends_on: [ build ]
+
+ - name: docker-build
+ image: plugins/docker
+ settings:
+ dockerfile: Sources/Dockerfile
+ context: .
+ registry: hub.codefirst.iut.uca.fr
+ repo: hub.codefirst.iut.uca.fr/victor_perez.ngounou/bowlingapi
+ username:
+ from_secret: SECRET_REGISTRY_USERNAME
+ password:
+ from_secret: SECRET_REGISTRY_PASSWORD
+ when:
+ branch:
+ - master
+ depends_on: [ tests ]
volumes:
- name: docs
temp: {}
+
+
diff --git a/Sources/BowlingRepository/Interface/IEquipeRepository.cs b/Sources/BowlingRepository/Interface/IEquipeRepository.cs
index c0d3ef9..3508c6c 100644
--- a/Sources/BowlingRepository/Interface/IEquipeRepository.cs
+++ b/Sources/BowlingRepository/Interface/IEquipeRepository.cs
@@ -2,11 +2,39 @@
namespace BowlingRepository.Interface;
+///
+/// Interface de gestion des équipes
+///
public interface IEquipeRepository
{
+ ///
+ /// Méthode d'ajout d'une équipe
+ ///
+ /// l'équipe à ajouter
public void Add(EquipeEntity equipe);
+
+ ///
+ /// Méthode de mise à jour d'une équipe
+ ///
+ /// l'équipe à mettre à jour
public void Update(EquipeEntity equipe);
+
+ ///
+ /// Méthode de suppression d'une équipe
+ ///
+ /// l'équipe à supprimer
public void Delete(EquipeEntity equipe);
+
+ ///
+ /// Méthode de récupération d'une équipe
+ ///
+ /// l'id de l'équipe à récupérer
+ /// l'équipe
public Task GetEquipe(int id);
+
+ ///
+ /// Méthode de récupération de toutes les équipes
+ ///
+ /// la liste des équipes
public IEnumerable GetAllEquipes();
}
\ No newline at end of file
diff --git a/Sources/BowlingRepository/Interface/IJoueurRepository.cs b/Sources/BowlingRepository/Interface/IJoueurRepository.cs
index fe87bb9..2384ea8 100644
--- a/Sources/BowlingRepository/Interface/IJoueurRepository.cs
+++ b/Sources/BowlingRepository/Interface/IJoueurRepository.cs
@@ -2,12 +2,49 @@ using BowlingEF.Entities;
namespace BowlingRepository.Interface;
+///
+/// Interface de gestion des joueurs
+///
public interface IJoueurRepository
{
+ ///
+ /// Méthode d'ajout d'un joueur
+ ///
+ /// le joueur à ajouter
+ /// le joueur ajouté
public Task Add(JoueurEntity joueur);
+
+ ///
+ /// Méthode de suppression d'un joueur
+ ///
+ /// l'id du joueur à supprimer
+ /// le joueur supprimé
public Task Delete(long id);
+
+ ///
+ /// Méthode de mise à jour d'un joueur
+ ///
+ /// le joueur à mettre à jour
+ /// le joueur mis à jour
public Task Update(JoueurEntity joueur);
+
+ ///
+ /// Méthode de récupération d'un joueur
+ ///
+ /// l'id du joueur à récupérer
+ /// le joueur
public Task GetJoueur(long id);
+
+ ///
+ /// Méthode de récupération de tous les joueurs
+ ///
+ /// la liste des joueurs
public Task> GetAllJoueur();
+
+ ///
+ /// Méthode de récupération d'un joueur par son nom
+ ///
+ /// le nom du joueur à récupérer
+ /// le joueur
public Task GetJoueurByNom(string nom);
}
\ No newline at end of file
diff --git a/Sources/BowlingRepository/Interface/IpartieRepository.cs b/Sources/BowlingRepository/Interface/IpartieRepository.cs
index a1d2df6..bda8b5b 100644
--- a/Sources/BowlingRepository/Interface/IpartieRepository.cs
+++ b/Sources/BowlingRepository/Interface/IpartieRepository.cs
@@ -3,8 +3,16 @@ using BowlingEF.Entities;
namespace BowlingRepository.Interface
{
+ ///
+ /// Interface de gestion des parties
+ ///
public interface IpartieRepository
{
+ ///
+ /// Méthode d'ajout d'une partie
+ ///
+ /// la partie à ajouter
+ ///
public Task Add(PartieEntity _partie);
public Task Delete(long id);
public Task Update(PartieEntity _partie);
diff --git a/Sources/Mapper/FrameProfile.cs b/Sources/Mapper/FrameProfile.cs
index ceecdd1..b3acf46 100644
--- a/Sources/Mapper/FrameProfile.cs
+++ b/Sources/Mapper/FrameProfile.cs
@@ -4,6 +4,9 @@ using DTOs;
namespace Mapper;
+///
+/// Profile de mapping entre les FrameDTOs et les FrameEntity
+///
public class FrameProfile:Profile
{
public FrameProfile()
diff --git a/Sources/Mapper/JoueurProfile.cs b/Sources/Mapper/JoueurProfile.cs
index 3f24031..05c5ccc 100644
--- a/Sources/Mapper/JoueurProfile.cs
+++ b/Sources/Mapper/JoueurProfile.cs
@@ -4,6 +4,9 @@ using DTOs;
namespace Mapper;
+///
+/// Profile de mapping entre les JoueurDTOs et les JoueurEntity
+///
public class JoueurProfile:Profile
{
public JoueurProfile()
diff --git a/Sources/Mapper/PartieProfile.cs b/Sources/Mapper/PartieProfile.cs
index 3305846..12f4282 100644
--- a/Sources/Mapper/PartieProfile.cs
+++ b/Sources/Mapper/PartieProfile.cs
@@ -4,6 +4,9 @@ using DTOs;
namespace Mapper;
+///
+/// Profile de mapping entre les PartieDTOs et les PartieEntity
+///
public class PartieProfile:Profile
{
public PartieProfile()