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-WebAdmin/.drone.yml

49 lines
1.4 KiB

kind: pipeline
type: docker
name: CI
trigger:
event:
- push
steps:
- name: build
image: mcr.microsoft.com/dotnet/sdk:7.0
commands:
- cd Sources/
- dotnet restore MySolution.sln
- dotnet build MySolution.sln -c Release --no-restore
- dotnet publish WF-WebAdmin/WF-WebAdmin.csproj -c Release --no-restore -o $CI_PROJECT_DIR/build/publish
- name: tests
image: mcr.microsoft.com/dotnet/sdk:7.0
commands:
- cd Sources/
- dotnet restore MySolution.sln
- dotnet test MySolution.sln --no-restore
depends_on: [build]
- name: analyze
image: mcr.microsoft.com/dotnet/sdk:7.0
commands:
- cd Sources/
# Lancer l'analyse statique en forçant l'exécution des analyzers
- dotnet build MySolution.sln -c Release --no-restore /p:RunAnalyzers=true
depends_on: [build]
- name: docker_build
image: plugins/docker
settings:
# Nom de l'image Docker qui hébergera votre application Blazor
repo: hub.codefirst.iut.uca.fr/marc.chevaldonne/your-blazor-app
# Dockerfile pour construire l'image (placé à la racine de votre dépôt)
dockerfile: Dockerfile
tags:
- latest
# Secrets pour l'authentification sur votre registry (à configurer dans Drone)
username:
from_secret: docker_username
password:
from_secret: docker_password
depends_on: [build, tests, analyze]