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

53 lines
1.6 KiB

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
# Lancer la build avec les analyzers pour détecter d'éventuelles alertes
- dotnet build WF-WebAdmin.csproj -c Release --no-restore /p:RunAnalyzers=true
depends_on: [build]
- name: docker_build
image: plugins/docker
settings:
# Nom complet de l'image à pousser (à adapter si besoin)
repo: hub.codefirst.iut.uca.fr/marc.chevaldonne/wf-webadmin
# Chemin vers votre Dockerfile dans le dossier Docker
dockerfile: Docker/Dockerfile
tags:
- latest
# Les identifiants pour votre registry doivent être définis dans Drone en tant que secrets
username:
from_secret: docker_username
password:
from_secret: docker_password
depends_on: [build, tests, analyze]