From a5b6fac9a6e0030e45187af6adee52c659365517 Mon Sep 17 00:00:00 2001 From: Kevin MONDEJAR Date: Tue, 25 Mar 2025 17:17:14 +0100 Subject: [PATCH] =?UTF-8?q?debut=20CI=20(a=20finir=20mais=20pas=20touche,?= =?UTF-8?q?=20j'ai=20un=20mod=C3=A8le=20complet=20et=20fonctionnel=20entre?= =?UTF-8?q?=20les=20main)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 91 ++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 75 insertions(+), 16 deletions(-) diff --git a/.drone.yml b/.drone.yml index 6b39127..ed13d1e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,23 +1,82 @@ -image: mcr.microsoft.com/dotnet/sdk:8.0 +kind: pipeline +type: docker +name: CI_ApiPm -volumes: - - name: docs - path: /docs +trigger: + event: + - push + branch: + exclude: + - master -- dotnet new tool-manifest -- dotnet tool install NSwag.ConsoleCore -- dotnet nswag aspnetcore2openapi /output:/docs/swagger.json +steps: + - name: retore & build + image: mcr.microsoft.com/dotnet/sdk:8.0 + commands: + - dotnet build --configuration Release + depend_on: [clone] -volumes: -- name: docs - temp: {} + - name: test + image: mcr.microsoft.com/dotnet/sdk:8.0 + commands: + - dotnet test + depends_on: [retore & build] + + - name: publish + image: mcr.microsoft.com/dotnet/sdk:8.0 + commands: + - dotnet publish -c Release -o out + depends_on: [retore & build, test] + +--- + +kind: pipeline +type: docker +name: CI_ApiPm_Master + +trigger: + event: + - push + branch: + - master -image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-docdeployer volumes: - - name: docs - path: /docs + - name: doc + temp: {} + + +steps: + - name: retore & build + image: mcr.microsoft.com/dotnet/sdk:8.0 + commands: + - dotnet build --configuration Release + depend_on: [clone] -commands: - - /entrypoint.sh + - name: test + image: mcr.microsoft.com/dotnet/sdk:8.0 + commands: + - dotnet test + depends_on: [retore & build] -depends_on: [ previous_job_name ] \ No newline at end of file + - name: generate doc + image: mcr.microsoft.com/dotnet/sdk:8.0 + volumes: + - name: doc + path: /doc + commands: + - dotnet new tool-manifest + - dotnet tool install NSwag.ConsoleCore + - dotnet restore + - cd WF_EF_Api/WfApi + - dotnet nswag aspnetcore2openapi /output:/doc/swagger.json + depends_on: [clone, retore & build] + + #- name: code-inspection + # image: hub.codefirst.iut.uca.fr/marc.chevaldonne:codefirs-dronsonarplugin-dotnet8 + # secret: [SECRET_SONAR_LOGIN] + # A FINIR + - name: publish + image: mcr.microsoft.com/dotnet/sdk:8.0 + commands: + - dotnet publish -c Release -o out + depends_on: [retore & build, test] \ No newline at end of file