test CI 4
continuous-integration/drone/push Build is failing Details

pull/29/head
Maxime ROCHER 3 months ago
parent 9603dbbb53
commit cf739c6b2e

@ -8,39 +8,43 @@ trigger:
steps: steps:
- name: build - name: build
image: mcr.microsoft.com/dotnet/sdk:7.0 image: mcr.microsoft.com/dotnet/sdk:6.0
commands: commands:
- cd Sources/ # On se positionne dans le dossier du projet
- dotnet restore MySolution.sln - cd WF-WebAdmin/WF-WebAdmin
- dotnet build MySolution.sln -c Release --no-restore # Restauration des dépendances
- dotnet publish WF-WebAdmin/WF-WebAdmin.csproj -c Release --no-restore -o $CI_PROJECT_DIR/build/publish - 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 - name: tests
image: mcr.microsoft.com/dotnet/sdk:7.0 image: mcr.microsoft.com/dotnet/sdk:6.0
commands: commands:
- cd Sources/ - cd WF-WebAdmin/WF-WebAdmin
- dotnet restore MySolution.sln - dotnet restore WF-WebAdmin.csproj
- dotnet test MySolution.sln --no-restore - dotnet test WF-WebAdmin.csproj --no-restore
depends_on: [build] depends_on: [build]
- name: analyze - name: analyze
image: mcr.microsoft.com/dotnet/sdk:7.0 image: mcr.microsoft.com/dotnet/sdk:6.0
commands: commands:
- cd Sources/ - cd WF-WebAdmin/WF-WebAdmin
# Lancer l'analyse statique en forçant l'exécution des analyzers # Lancer la build avec les analyzers pour détecter d'éventuelles alertes
- dotnet build MySolution.sln -c Release --no-restore /p:RunAnalyzers=true - dotnet build WF-WebAdmin.csproj -c Release --no-restore /p:RunAnalyzers=true
depends_on: [build] depends_on: [build]
- name: docker_build - name: docker_build
image: plugins/docker image: plugins/docker
settings: settings:
# Nom de l'image Docker qui hébergera votre application Blazor # Nom complet de l'image à pousser (à adapter si besoin)
repo: hub.codefirst.iut.uca.fr/marc.chevaldonne/your-blazor-app repo: hub.codefirst.iut.uca.fr/marc.chevaldonne/wf-webadmin
# Dockerfile pour construire l'image (placé à la racine de votre dépôt) # Chemin vers votre Dockerfile dans le dossier Docker
dockerfile: Dockerfile dockerfile: Docker/Dockerfile
tags: tags:
- latest - 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: username:
from_secret: docker_username from_secret: docker_username
password: password:

Loading…
Cancel
Save