diff --git a/.drone.yml b/.drone.yml index 4e44234..92530f9 100644 --- a/.drone.yml +++ b/.drone.yml @@ -8,39 +8,43 @@ trigger: steps: - name: build - image: mcr.microsoft.com/dotnet/sdk:7.0 + image: mcr.microsoft.com/dotnet/sdk:6.0 commands: - - cd Sources/ - - dotnet restore MySolution.sln - - dotnet build MySolution.sln -c Release --no-restore - - dotnet publish WF-WebAdmin/WF-WebAdmin.csproj -c Release --no-restore -o $CI_PROJECT_DIR/build/publish + # On se positionne dans le dossier du projet + - cd WF-WebAdmin/WF-WebAdmin + # Restauration des dépendances + - dotnet restore WF-WebAdmin.csproj + # Compilation en mode Release + - dotnet build WF-WebAdmin.csproj -c Release --no-restore + # Publication de l'application dans le dossier build/publish du workspace + - dotnet publish WF-WebAdmin.csproj -c Release --no-restore -o $CI_PROJECT_DIR/build/publish - name: tests - image: mcr.microsoft.com/dotnet/sdk:7.0 + image: mcr.microsoft.com/dotnet/sdk:6.0 commands: - - cd Sources/ - - dotnet restore MySolution.sln - - dotnet test MySolution.sln --no-restore + - cd WF-WebAdmin/WF-WebAdmin + - dotnet restore WF-WebAdmin.csproj + - dotnet test WF-WebAdmin.csproj --no-restore depends_on: [build] - name: analyze - image: mcr.microsoft.com/dotnet/sdk:7.0 + image: mcr.microsoft.com/dotnet/sdk:6.0 commands: - - cd Sources/ - # Lancer l'analyse statique en forçant l'exécution des analyzers - - dotnet build MySolution.sln -c Release --no-restore /p:RunAnalyzers=true + - cd WF-WebAdmin/WF-WebAdmin + # Lancer la build avec les analyzers pour détecter d'éventuelles alertes + - dotnet build WF-WebAdmin.csproj -c Release --no-restore /p:RunAnalyzers=true depends_on: [build] - name: docker_build image: plugins/docker settings: - # Nom de l'image Docker qui hébergera votre application Blazor - repo: hub.codefirst.iut.uca.fr/marc.chevaldonne/your-blazor-app - # Dockerfile pour construire l'image (placé à la racine de votre dépôt) - dockerfile: Dockerfile + # Nom complet de l'image à pousser (à adapter si besoin) + repo: hub.codefirst.iut.uca.fr/marc.chevaldonne/wf-webadmin + # Chemin vers votre Dockerfile dans le dossier Docker + dockerfile: Docker/Dockerfile tags: - latest - # Secrets pour l'authentification sur votre registry (à configurer dans Drone) + # Les identifiants pour votre registry doivent être définis dans Drone en tant que secrets username: from_secret: docker_username password: