From 031a05ed0368715d8fab4bd8889e443096b46ea2 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 13:54:58 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A0=A0=ED=82=A8=EC=8A=A4=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index cb121f94..770fda1b 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'] } @@ -252,6 +272,7 @@ pipeline { echo "Tomcat이 실행 중이지 않습니다." fi ${env.TOMCAT_HOME}/bin/startup.sh + sleep 10 """ echo "Deploy 완료 (${params.ENVIRONMENT} 환경, ${env.GIT_BRANCH} 브랜치)" @@ -299,6 +320,17 @@ pipeline { } always { 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/webon.sh" + + echo "점검 web서버 config 구동" + echo '파이프라인 실행이 종료되었습니다.' if (params.DEPLOY_TARGET in ['ALL', 'WEB_ONLY']) { // 임시 디렉토리 정리