From feda8ddd817613953ee95b02cbe7d2cbfe3934ff Mon Sep 17 00:00:00 2001 From: Leni BEAULATON Date: Thu, 3 Apr 2025 16:02:31 +0200 Subject: [PATCH 01/12] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 3c94709..4f477cb 100644 --- a/.drone.yml +++ b/.drone.yml @@ -106,7 +106,10 @@ steps: environment: IMAGENAME: postgres:16.8-alpine3.20 CONTAINERNAME: wtf-api - COMMAND: create + COMMAND: + - create + - dotnet tool install --global dotnet-ef + - dotnet ef database update PRIVATE: true CODEFIRST_CLIENTDRONE_ENV_POSTGRES_PASSWORD: from_secret: POSTGRES_PASSWORD_API @@ -121,7 +124,10 @@ steps: environment: IMAGENAME: postgres:16.8-alpine3.20 CONTAINERNAME: wtf-api-auth - COMMAND: create + COMMAND: + - create + - dotnet tool install --global dotnet-ef + - dotnet ef database update PRIVATE: true CODEFIRST_CLIENTDRONE_ENV_POSTGRES_PASSWORD: from_secret: POSTGRES_PASSWORD_AUTH @@ -136,7 +142,10 @@ steps: environment: IMAGENAME: postgres:16.8-alpine3.20 CONTAINERNAME: wtf-api-test - COMMAND: create + COMMAND: + - create + - dotnet tool install --global dotnet-ef + - dotnet ef database update PRIVATE: true CODEFIRST_CLIENTDRONE_ENV_POSTGRES_PASSWORD: "test" CODEFIRST_CLIENTDRONE_ENV_POSTGRES_USER: "test" From 3c94e8900d0f165b753e120ccf28e3d3030107eb Mon Sep 17 00:00:00 2001 From: Leni BEAULATON Date: Thu, 3 Apr 2025 16:03:38 +0200 Subject: [PATCH 02/12] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 4f477cb..d5e2059 100644 --- a/.drone.yml +++ b/.drone.yml @@ -106,7 +106,7 @@ steps: environment: IMAGENAME: postgres:16.8-alpine3.20 CONTAINERNAME: wtf-api - COMMAND: + commands: - create - dotnet tool install --global dotnet-ef - dotnet ef database update @@ -124,7 +124,7 @@ steps: environment: IMAGENAME: postgres:16.8-alpine3.20 CONTAINERNAME: wtf-api-auth - COMMAND: + commands: - create - dotnet tool install --global dotnet-ef - dotnet ef database update @@ -142,7 +142,7 @@ steps: environment: IMAGENAME: postgres:16.8-alpine3.20 CONTAINERNAME: wtf-api-test - COMMAND: + commands: - create - dotnet tool install --global dotnet-ef - dotnet ef database update From 1bffdcd1cad6bcceeb2861d3fef75c9e241b6883 Mon Sep 17 00:00:00 2001 From: Leni BEAULATON Date: Thu, 3 Apr 2025 16:06:48 +0200 Subject: [PATCH 03/12] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.drone.yml b/.drone.yml index d5e2059..39a058b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -106,10 +106,7 @@ steps: environment: IMAGENAME: postgres:16.8-alpine3.20 CONTAINERNAME: wtf-api - commands: - - create - - dotnet tool install --global dotnet-ef - - dotnet ef database update + COMMAND: create PRIVATE: true CODEFIRST_CLIENTDRONE_ENV_POSTGRES_PASSWORD: from_secret: POSTGRES_PASSWORD_API @@ -118,16 +115,16 @@ steps: CODEFIRST_CLIENTDRONE_ENV_POSTGRES_DB: from_secret: POSTGRES_DB_API ADMINS: kentinbrongniart,lenibeaulaton,kevinmondejar,louisguichard-montguers,maximerocher,tommynguyen2 + commands: + - dotnet tool install --global dotnet-ef + - dotnet ef database update - name: deploy-auth-db image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest environment: IMAGENAME: postgres:16.8-alpine3.20 CONTAINERNAME: wtf-api-auth - commands: - - create - - dotnet tool install --global dotnet-ef - - dotnet ef database update + COMMAND: create PRIVATE: true CODEFIRST_CLIENTDRONE_ENV_POSTGRES_PASSWORD: from_secret: POSTGRES_PASSWORD_AUTH @@ -136,21 +133,24 @@ steps: CODEFIRST_CLIENTDRONE_ENV_POSTGRES_DB: from_secret: POSTGRES_DB_AUTH ADMINS: kentinbrongniart,lenibeaulaton,kevinmondejar,louisguichard-montguers,maximerocher,tommynguyen2 + commands: + - dotnet tool install --global dotnet-ef + - dotnet ef database update - name: deploy-test-db image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest environment: IMAGENAME: postgres:16.8-alpine3.20 CONTAINERNAME: wtf-api-test - commands: - - create - - dotnet tool install --global dotnet-ef - - dotnet ef database update + COMMAND: create PRIVATE: true CODEFIRST_CLIENTDRONE_ENV_POSTGRES_PASSWORD: "test" CODEFIRST_CLIENTDRONE_ENV_POSTGRES_USER: "test" CODEFIRST_CLIENTDRONE_ENV_POSTGRES_DB: "wtf-test" ADMINS: kentinbrongniart,lenibeaulaton,kevinmondejar,louisguichard-montguers,maximerocher,tommynguyen2 + commands: + - dotnet tool install --global dotnet-ef + - dotnet ef database update - name: publish-to-registry image: plugins/docker From 26e2aaa75c5096da58a2c9e2e7505dc923db3b39 Mon Sep 17 00:00:00 2001 From: Leni BEAULATON Date: Thu, 3 Apr 2025 16:08:41 +0200 Subject: [PATCH 04/12] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.drone.yml b/.drone.yml index 39a058b..b53c597 100644 --- a/.drone.yml +++ b/.drone.yml @@ -116,6 +116,7 @@ steps: from_secret: POSTGRES_DB_API ADMINS: kentinbrongniart,lenibeaulaton,kevinmondejar,louisguichard-montguers,maximerocher,tommynguyen2 commands: + - cd WF_EF_Api/StubbedContextLib - dotnet tool install --global dotnet-ef - dotnet ef database update @@ -134,6 +135,7 @@ steps: from_secret: POSTGRES_DB_AUTH ADMINS: kentinbrongniart,lenibeaulaton,kevinmondejar,louisguichard-montguers,maximerocher,tommynguyen2 commands: + - cd WF_EF_Api/StubbedContextLib - dotnet tool install --global dotnet-ef - dotnet ef database update @@ -149,6 +151,7 @@ steps: CODEFIRST_CLIENTDRONE_ENV_POSTGRES_DB: "wtf-test" ADMINS: kentinbrongniart,lenibeaulaton,kevinmondejar,louisguichard-montguers,maximerocher,tommynguyen2 commands: + - cd WF_EF_Api/StubbedContextLib - dotnet tool install --global dotnet-ef - dotnet ef database update From ed87c0a42b56faf10d9f91f8b68f35d5993bb244 Mon Sep 17 00:00:00 2001 From: Leni BEAULATON Date: Thu, 3 Apr 2025 16:10:18 +0200 Subject: [PATCH 05/12] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/.drone.yml b/.drone.yml index b53c597..969979a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -115,10 +115,6 @@ steps: CODEFIRST_CLIENTDRONE_ENV_POSTGRES_DB: from_secret: POSTGRES_DB_API ADMINS: kentinbrongniart,lenibeaulaton,kevinmondejar,louisguichard-montguers,maximerocher,tommynguyen2 - commands: - - cd WF_EF_Api/StubbedContextLib - - dotnet tool install --global dotnet-ef - - dotnet ef database update - name: deploy-auth-db image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest @@ -134,10 +130,6 @@ steps: CODEFIRST_CLIENTDRONE_ENV_POSTGRES_DB: from_secret: POSTGRES_DB_AUTH ADMINS: kentinbrongniart,lenibeaulaton,kevinmondejar,louisguichard-montguers,maximerocher,tommynguyen2 - commands: - - cd WF_EF_Api/StubbedContextLib - - dotnet tool install --global dotnet-ef - - dotnet ef database update - name: deploy-test-db image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest @@ -150,10 +142,6 @@ steps: CODEFIRST_CLIENTDRONE_ENV_POSTGRES_USER: "test" CODEFIRST_CLIENTDRONE_ENV_POSTGRES_DB: "wtf-test" ADMINS: kentinbrongniart,lenibeaulaton,kevinmondejar,louisguichard-montguers,maximerocher,tommynguyen2 - commands: - - cd WF_EF_Api/StubbedContextLib - - dotnet tool install --global dotnet-ef - - dotnet ef database update - name: publish-to-registry image: plugins/docker @@ -202,3 +190,7 @@ steps: ADMINS: kentinbrongniart,lenibeaulaton,kevinmondejar,louisguichard-montguers,maximerocher,tommynguyen2 depends_on: [restore & build, test, code-inspection, publish, publish-to-registry] + commands: + - cd WF_EF_Api/StubbedContextLib + - dotnet tool install --global dotnet-ef + - dotnet ef database update From dac0c7a433b83240380936e5843eb81bd0524021 Mon Sep 17 00:00:00 2001 From: Leni BEAULATON Date: Thu, 3 Apr 2025 16:15:20 +0200 Subject: [PATCH 06/12] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 969979a..8c7fd79 100644 --- a/.drone.yml +++ b/.drone.yml @@ -99,6 +99,9 @@ steps: image: mcr.microsoft.com/dotnet/sdk:8.0 commands: - dotnet publish WF_EF_Api/WfApi/WfApi.csproj -c Release -o out + - cd WF_EF_Api/StubbedContextLib + - dotnet tool install --global dotnet-ef + - dotnet ef database update depends_on: [restore & build, test] - name: deploy-api-db @@ -190,7 +193,3 @@ steps: ADMINS: kentinbrongniart,lenibeaulaton,kevinmondejar,louisguichard-montguers,maximerocher,tommynguyen2 depends_on: [restore & build, test, code-inspection, publish, publish-to-registry] - commands: - - cd WF_EF_Api/StubbedContextLib - - dotnet tool install --global dotnet-ef - - dotnet ef database update From d0765e9194e73ca3b06c3fb2149a098759538e5f Mon Sep 17 00:00:00 2001 From: Leni BEAULATON Date: Thu, 3 Apr 2025 16:21:08 +0200 Subject: [PATCH 07/12] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 8c7fd79..84d5a97 100644 --- a/.drone.yml +++ b/.drone.yml @@ -99,10 +99,15 @@ steps: image: mcr.microsoft.com/dotnet/sdk:8.0 commands: - dotnet publish WF_EF_Api/WfApi/WfApi.csproj -c Release -o out + depends_on: [restore & build, test] + + - name: update-database + image: mcr.microsoft.com/dotnet/sdk:8.0 + commands: - cd WF_EF_Api/StubbedContextLib - dotnet tool install --global dotnet-ef - - dotnet ef database update - depends_on: [restore & build, test] + - dotnet ef database update --connection "Server=;Database=;User Id=;Password=;" + depends_on: [publish] - name: deploy-api-db image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest From ddc7bd482a3b39622a59ff0c56a09762e7b7de04 Mon Sep 17 00:00:00 2001 From: Leni BEAULATON Date: Thu, 3 Apr 2025 16:28:12 +0200 Subject: [PATCH 08/12] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/.drone.yml b/.drone.yml index 84d5a97..d0a3524 100644 --- a/.drone.yml +++ b/.drone.yml @@ -101,14 +101,6 @@ steps: - dotnet publish WF_EF_Api/WfApi/WfApi.csproj -c Release -o out depends_on: [restore & build, test] - - name: update-database - image: mcr.microsoft.com/dotnet/sdk:8.0 - commands: - - cd WF_EF_Api/StubbedContextLib - - dotnet tool install --global dotnet-ef - - dotnet ef database update --connection "Server=;Database=;User Id=;Password=;" - depends_on: [publish] - - name: deploy-api-db image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest environment: @@ -151,6 +143,21 @@ steps: CODEFIRST_CLIENTDRONE_ENV_POSTGRES_DB: "wtf-test" ADMINS: kentinbrongniart,lenibeaulaton,kevinmondejar,louisguichard-montguers,maximerocher,tommynguyen2 + - name: update-database + image: mcr.microsoft.com/dotnet/sdk:8.0 + DB_SERVER: "WhatTheFantasy-wtf-api" + DB_NAME: + from_secret: POSTGRES_DB_AUTH + USER_ID: + from_secret: POSTGRES_USER_AUTH + PASSWORD: + from_secret: POSTGRES_PASSWORD_AUTH + commands: + - cd WF_EF_Api/StubbedContextLib + - dotnet tool install --global dotnet-ef + - dotnet-ef database update --connection "Server=;Database=;User Id=;Password=;" + depends_on: [deploy-api-db,deploy-auth-db,deploy-test-db] + - name: publish-to-registry image: plugins/docker settings: From 8383532f7978afc17a771b5225a4f6841f7e1ace Mon Sep 17 00:00:00 2001 From: Leni BEAULATON Date: Thu, 3 Apr 2025 16:29:35 +0200 Subject: [PATCH 09/12] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index d0a3524..45e53ee 100644 --- a/.drone.yml +++ b/.drone.yml @@ -155,7 +155,7 @@ steps: commands: - cd WF_EF_Api/StubbedContextLib - dotnet tool install --global dotnet-ef - - dotnet-ef database update --connection "Server=;Database=;User Id=;Password=;" + - dotnet ef database update --connection "Server=;Database=;User Id=;Password=;" depends_on: [deploy-api-db,deploy-auth-db,deploy-test-db] - name: publish-to-registry From 197251908cf6104ceb96089a8b640993801d1ac9 Mon Sep 17 00:00:00 2001 From: Leni BEAULATON Date: Thu, 3 Apr 2025 16:31:13 +0200 Subject: [PATCH 10/12] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 45e53ee..732f30b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -155,7 +155,7 @@ steps: commands: - cd WF_EF_Api/StubbedContextLib - dotnet tool install --global dotnet-ef - - dotnet ef database update --connection "Server=;Database=;User Id=;Password=;" + - dotnet ef database update depends_on: [deploy-api-db,deploy-auth-db,deploy-test-db] - name: publish-to-registry From 11e9f528b01853d3a7596c4445035ec996d8d5fd Mon Sep 17 00:00:00 2001 From: Leni BEAULATON Date: Thu, 3 Apr 2025 16:36:05 +0200 Subject: [PATCH 11/12] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 732f30b..adf4971 100644 --- a/.drone.yml +++ b/.drone.yml @@ -155,7 +155,7 @@ steps: commands: - cd WF_EF_Api/StubbedContextLib - dotnet tool install --global dotnet-ef - - dotnet ef database update + - dotnet-ef database update depends_on: [deploy-api-db,deploy-auth-db,deploy-test-db] - name: publish-to-registry From 8e24f3bd4d3c9d2834024bdd5466f58b80159f35 Mon Sep 17 00:00:00 2001 From: Leni BEAULATON Date: Thu, 3 Apr 2025 16:37:16 +0200 Subject: [PATCH 12/12] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index adf4971..304a509 100644 --- a/.drone.yml +++ b/.drone.yml @@ -155,7 +155,8 @@ steps: commands: - cd WF_EF_Api/StubbedContextLib - dotnet tool install --global dotnet-ef - - dotnet-ef database update + - export PATH="$PATH:/root/.dotnet/tools" + - dotnet ef database update depends_on: [deploy-api-db,deploy-auth-db,deploy-test-db] - name: publish-to-registry