From 0eaf1eae794adb5c2acad2d608f4c1abc7051709 Mon Sep 17 00:00:00 2001 From: SEAN-59 Date: Thu, 22 May 2025 10:25:15 +0900 Subject: [PATCH] =?UTF-8?q?[=E2=99=BB=EF=B8=8F]=20Jenkins=20=EB=8F=99?= =?UTF-8?q?=EC=9E=91=20=EB=A1=9C=EC=A7=81=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile | 16 ++++++++++++++++ Program.cs | 7 +++---- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 399a767..1302ae9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,6 +9,22 @@ pipeline { APP_VOLUME = '/src' } stages { + stage('Clear Repository') { + steps { + script { + sh """ + echo 'Clearing Front directory' + docker run --rm -v /volume1/AcaMate/PROJECT/Application/Back:/back alpine \ + sh -c "find /back -mindepth 1 -maxdepth 1 \\ + ! -name 'private' \\ + ! -name 'publish' \\ + ! -name 'wwwroot' \\ + -exec rm -rf {} +" + echo 'Clean complete' + """ + } + } + } stage('Clone Repository') { steps { git url: 'https://git.ipstein.myds.me/AcaMate/AcaMate_API.git', branch: env.GIT_BRANCH diff --git a/Program.cs b/Program.cs index 0206c6f..2a58239 100644 --- a/Program.cs +++ b/Program.cs @@ -179,9 +179,8 @@ var app = builder.Build(); string staticRoot; if (isLocal) { - staticRoot = app.Environment.IsDevelopment() ? - Path.Combine(Directory.GetCurrentDirectory(), "publish", "debug", "wwwroot") : - Path.Combine(Directory.GetCurrentDirectory(), "publish", "release", "wwwroot") ; + staticRoot = app.Environment.IsDevelopment() ? //"/publish/debug/wwwroot" : "/publish/release/wwwroot" ; + Path.Combine(Directory.GetCurrentDirectory(), "publish", "debug", "wwwroot") : Path.Combine(Directory.GetCurrentDirectory(), "publish", "release", "wwwroot") ; } else { @@ -225,8 +224,8 @@ app.UseWebSockets(); app.UseEndpoints(end => { ControllerEndpointRouteBuilderExtensions.MapControllers(end); - end.MapFallbackToFile("index.html"); end.MapHub("/chatHub"); + end.MapFallbackToFile("index.html"); });