kind: pipeline type: docker name: CI trigger: event: - push steps: - name: build image: mcr.microsoft.com/dotnet/sdk:6.0 commands: # 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:6.0 commands: - 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:6.0 commands: - cd WF-WebAdmin/WF-WebAdmin - dotnet restore WF-WebAdmin.csproj - dotnet build WF-WebAdmin.csproj -c Release /p:RunAnalyzers=true depends_on: [build] - name: docker_build image: plugins/docker settings: repo: hub.codefirst.iut.uca.fr/marc.chevaldonne/wf-webadmin registry: hub.codefirst.iut.uca.fr # Spécifie explicitement le registry à utiliser dockerfile: Docker/Dockerfile tags: - latest username: from_secret: docker_username password: from_secret: docker_password depends_on: [build, tests, analyze]