젠킨스파일 점검페이지 웹 블록 설정 및 해제 추가
This commit is contained in:
34
Jenkinsfile
vendored
34
Jenkinsfile
vendored
@@ -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} 브랜치)"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user