From b54c12733059be39f07439391cae92b12af5d8b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=ED=98=84=EC=9A=B1?= Date: Fri, 10 Apr 2026 16:03:44 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A0=A0=ED=82=A8=EC=8A=A4=ED=8C=8C=EC=9D=BC?= =?UTF-8?q?=20=EC=A0=90=EA=B2=80=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=9B=B9=20?= =?UTF-8?q?=EB=B8=94=EB=A1=9D=20=EC=84=A4=EC=A0=95=20=EB=B0=8F=20=ED=95=B4?= =?UTF-8?q?=EC=A0=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index cb121f94..d9e664d7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -84,6 +84,26 @@ pipeline { } } + stage('Web Server block activate') { + when { + expression { params.DEPLOY_TARGET in ['ALL', 'WAS_ONLY'] } + } + steps { + script { + // Nginx 서버에 점검 페이지로 블록 설정 + sshCommand remote: [ + name: 'Nginx Server', + host: "${env.NGINX_SERVER_IP}", + user: "${env.NGINX_USER}", + identityFile: "${env.SSH_KEY_PATH}", + allowAnyHosts: true + ], command: "/etc/nginx/weboff.sh" + + echo "점검 web서버 config 구동" + } + } + } + stage('Prepare and Deploy Static Resources') { when { expression { params.DEPLOY_TARGET in ['ALL', 'WEB_ONLY'] } @@ -254,6 +274,20 @@ pipeline { ${env.TOMCAT_HOME}/bin/startup.sh """ + // Nginx 서버에 정상 페이지로 블록 해제 + sshCommand remote: [ + name: 'Nginx Server', + host: "${env.NGINX_SERVER_IP}", + user: "${env.NGINX_USER}", + identityFile: "${env.SSH_KEY_PATH}", + allowAnyHosts: true + ], command: """ + sleep 30 + /etc/nginx/webon.sh + """ + + echo "점검 web서버 config 구동" + echo "Deploy 완료 (${params.ENVIRONMENT} 환경, ${env.GIT_BRANCH} 브랜치)" } }