You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
WF-PmAPI/.drone.yml

82 lines
1.7 KiB

kind: pipeline
type: docker
name: CI_ApiPm
trigger:
event:
- push
branch:
exclude:
- master
steps:
- name: retore & build
image: mcr.microsoft.com/dotnet/sdk:8.0
commands:
- dotnet build --configuration Release
depend_on: [clone]
- 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
volumes:
- name: doc
temp: {}
steps:
- name: retore & build
image: mcr.microsoft.com/dotnet/sdk:8.0
commands:
- dotnet build --configuration Release
depend_on: [clone]
- name: test
image: mcr.microsoft.com/dotnet/sdk:8.0
commands:
- dotnet test
depends_on: [retore & build]
- 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]