deploiement 7
continuous-integration/drone/push Build is failing Details

pull/29/head
Maxime ROCHER 3 months ago
parent 5fbd65e3ba
commit 37a0b06885

@ -7,6 +7,7 @@ trigger:
- push - push
steps: steps:
# 1. BUILD
- name: build - name: build
image: mcr.microsoft.com/dotnet/sdk:6.0 image: mcr.microsoft.com/dotnet/sdk:6.0
commands: commands:
@ -15,6 +16,7 @@ steps:
- dotnet build WF-WebAdmin.csproj -c Release --no-restore - dotnet build WF-WebAdmin.csproj -c Release --no-restore
- dotnet publish WF-WebAdmin.csproj -c Release --no-restore -o $CI_PROJECT_DIR/build/publish - dotnet publish WF-WebAdmin.csproj -c Release --no-restore -o $CI_PROJECT_DIR/build/publish
# 2. TESTS
- name: tests - name: tests
image: mcr.microsoft.com/dotnet/sdk:6.0 image: mcr.microsoft.com/dotnet/sdk:6.0
commands: commands:
@ -23,6 +25,7 @@ steps:
- dotnet test WF-WebAdmin.csproj --no-restore - dotnet test WF-WebAdmin.csproj --no-restore
depends_on: [ build ] depends_on: [ build ]
# 3. CODE ANALYSIS (SONARQUBE)
- name: code-analysis - name: code-analysis
image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dronesonarplugin-dotnet8 image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dronesonarplugin-dotnet8
commands: commands:
@ -43,6 +46,7 @@ steps:
coverage_exclusions: "Tests/**" coverage_exclusions: "Tests/**"
depends_on: [ tests ] depends_on: [ tests ]
# 4. GENERATION ET DEPLOIEMENT DE DOCS (OPTIONNEL)
- name: generate-and-deploy-docs - name: generate-and-deploy-docs
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-docdeployer image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-docdeployer
failure: ignore failure: ignore
@ -56,6 +60,7 @@ steps:
- master - master
depends_on: [ build ] depends_on: [ build ]
# 5. CONSTRUCTION DE L'IMAGE DOCKER
- name: docker_build - name: docker_build
image: plugins/docker image: plugins/docker
settings: settings:
@ -70,17 +75,13 @@ steps:
from_secret: docker_password from_secret: docker_password
depends_on: [ build, tests, code-analysis ] depends_on: [ build, tests, code-analysis ]
# 6. DEPLOIEMENT
- name: deploy - name: deploy
image: mcr.microsoft.com/dotnet/aspnet:6.0 # On réutilise l'image que l'on vient de builder et de pousser
environment: image: hub.codefirst.iut.uca.fr/whatthefantasy/wf-webadmin:latest
IMAGENAME: hub.codefirst.iut.uca.fr/whatthefantasy/wf-webadmin
CONTAINERNAME: WF-WebAdmin
COMMAND: create
OVERWRITE: true
ADMINS: maximerocher,kevinmondejar,lenibeaulaton,kentinbrongniart,tommynguyen
commands: commands:
- ls /app # Vérification que WF-WebAdmin.dll est bien présent - ls /app
- dotnet WF-WebAdmin.dll - dotnet /app/WF-WebAdmin.dll
when: when:
branch: branch:
- master - master

Loading…
Cancel
Save