diff --git a/.drone.yml b/.drone.yml index 8998d5c..7750e5a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -16,24 +16,24 @@ volumes: temp: {} steps: - - name: retore & build + - name: restore & build image: mcr.microsoft.com/dotnet/sdk:8.0 commands: - dotnet build WF_EF_Api/WF_EF_Api.sln --configuration Release - depend_on: [clone] + depends_on: [clone] - name: test image: mcr.microsoft.com/dotnet/sdk:8.0 commands: - dotnet test WF_EF_Api/XUnitTest/XUnitTest.csproj - depends_on: [retore & build] - + depends_on: [restore & build] + - name: publish image: mcr.microsoft.com/dotnet/sdk:8.0 commands: - dotnet publish WF_EF_Api/WfApi/WfApi.csproj -c Release -o out - depends_on: [retore & build, test] - + depends_on: [restore & build, test] + --- kind: pipeline @@ -50,19 +50,18 @@ volumes: - name: doc temp: {} - steps: - - name: retore & build + - name: restore & build image: mcr.microsoft.com/dotnet/sdk:8.0 commands: - dotnet build WF_EF_Api/WF_EF_Api.sln --configuration Release - depend_on: [clone] + depends_on: [clone] - name: test image: mcr.microsoft.com/dotnet/sdk:8.0 commands: - dotnet test WF_EF_Api/XUnitTest/XUnitTest.csproj - depends_on: [retore & build] + depends_on: [restore & build] - name: generate doc image: mcr.microsoft.com/dotnet/sdk:8.0 @@ -75,14 +74,15 @@ steps: - dotnet restore WF_EF_Api/WF_EF_Api.sln - cd WF_EF_Api/WfApi - dotnet nswag aspnetcore2openapi /output:/doc/swagger.json - depends_on: [clone, retore & build] - + depends_on: [clone, restore & build] + - name: code-inspection image: hub.codefirst.iut.uca.fr/marc.chevaldonne:codefirs-dronsonarplugin-dotnet8 - secret: [SECRET_SONAR_LOGIN] + secrets: + - SECRET_SONAR_LOGIN environment: sonar_host: https://codefirst.iut.uca.fr/sonar/ - sonar_token: + sonar_token: from_secret: SECRET_SONAR_LOGIN project_key: wtf-service commands: @@ -94,24 +94,19 @@ steps: - dotnet sonarscanner end /d:sonar.login=$${sonar_token} depends_on: [test] - - - name: publish image: mcr.microsoft.com/dotnet/sdk:8.0 commands: - dotnet publish WF_EF_Api/WfApi/WfApi.csproj -c Release -o out - depends_on: [retore & build, test] - + depends_on: [restore & build, test] - -- name: deploy-api-db + - name: deploy-api-db image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest environment: IMAGENAME: postgres:16.8-alpine3.20 CONTAINERNAME: wtf-api COMMAND: create PRIVATE: true - #OVERWRITE: true CODEFIRST_CLIENTDRONE_ENV_POSTGRES_PASSWORD: from_secret: POSTGRES_PASSWORD_API CODEFIRST_CLIENTDRONE_ENV_POSTGRES_USER: @@ -119,7 +114,7 @@ steps: CODEFIRST_CLIENTDRONE_ENV_POSTGRES_DB: from_secret: POSTGRES_DB_API ADMINS: kentinbrongniart,lenibeaulaton - + - name: deploy-auth-db image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest environment: @@ -127,7 +122,6 @@ steps: CONTAINERNAME: wtf-api-auth COMMAND: create PRIVATE: true - #OVERWRITE: true CODEFIRST_CLIENTDRONE_ENV_POSTGRES_PASSWORD: from_secret: POSTGRES_PASSWORD_AUTH CODEFIRST_CLIENTDRONE_ENV_POSTGRES_USER: @@ -136,7 +130,6 @@ steps: from_secret: POSTGRES_DB_AUTH ADMINS: kentinbrongniart,lenibeaulaton - - name: deploy-test-db image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest environment: @@ -144,7 +137,6 @@ steps: CONTAINERNAME: wtf-api-test COMMAND: create PRIVATE: true - #OVERWRITE: true CODEFIRST_CLIENTDRONE_ENV_POSTGRES_PASSWORD: "test" CODEFIRST_CLIENTDRONE_ENV_POSTGRES_USER: "test" CODEFIRST_CLIENTDRONE_ENV_POSTGRES_DB: "wtf-test" @@ -163,7 +155,6 @@ steps: from_secret: SECRET_REGISTRY_PASSWORD depends_on: [restore & build, test, code-inspection, publish] - - name: deploy-container image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest environment: @@ -191,6 +182,3 @@ steps: CODEFIRST_CLIENTDRONE_ENV_DB_DATABASE_API_TEST: "wtf-db-test" ADMINS: kentinbrongniart,lenibeaulaton depends_on: [restore & build, test, code-inspection, publish, publish-to-registry] - - -