debut CI (a finir mais pas touche, j'ai un modèle complet et fonctionnel entre les main)

API_init
Kevin MONDEJAR 4 weeks ago
parent 6584bf6caf
commit a5b6fac9a6

@ -1,23 +1,82 @@
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 image: mcr.microsoft.com/dotnet/sdk:8.0
commands:
- dotnet build --configuration Release
depend_on: [clone]
volumes: - name: test
- name: docs image: mcr.microsoft.com/dotnet/sdk:8.0
path: /docs commands:
- dotnet test
depends_on: [retore & build]
- dotnet new tool-manifest - name: publish
- dotnet tool install NSwag.ConsoleCore image: mcr.microsoft.com/dotnet/sdk:8.0
- dotnet nswag aspnetcore2openapi /output:/docs/swagger.json 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: volumes:
- name: docs - name: doc
temp: {} temp: {}
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-docdeployer
volumes:
- name: docs
path: /docs
steps:
- name: retore & build
image: mcr.microsoft.com/dotnet/sdk:8.0
commands: commands:
- /entrypoint.sh - dotnet build --configuration Release
depend_on: [clone]
depends_on: [ previous_job_name ] - 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]
Loading…
Cancel
Save