diff --git a/Jenkinsfile b/Jenkinsfile index d5294ed..f855967 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -18,7 +18,7 @@ pipeline { BACKUP_FILE = "${TOMCAT_HOME}/backup/sake_batch.war.bak" // SSH 키 (쇼핑몰과 동일하게 주석 처리 - jenkins 기본 키 사용) - // SSH_KEY_PATH = "/var/lib/jenkins/.ssh/batch_server_key" + SSH_KEY_PATH = "/var/lib/jenkins/.ssh/batch_server_key" } stages { @@ -44,7 +44,7 @@ pipeline { name: 'Batch Server', host: "${env.SERVER_IP}", user: "${env.SERVER_USER}", - // identityFile: "${env.SSH_KEY_PATH}", + identityFile: "${env.SSH_KEY_PATH}", allowAnyHosts: true ], command: """ if [ -f ${env.DEPLOY_FILE} ]; then @@ -66,7 +66,7 @@ pipeline { name: 'Batch Server', host: "${env.SERVER_IP}", user: "${env.SERVER_USER}", - // identityFile: "${env.SSH_KEY_PATH}", + identityFile: "${env.SSH_KEY_PATH}", allowAnyHosts: true ], from: "build/libs/${env.APP_NAME}.war", into: "${env.DEPLOY_FILE}" @@ -75,7 +75,7 @@ pipeline { name: 'Batch Server', host: "${env.SERVER_IP}", user: "${env.SERVER_USER}", - // identityFile: "${env.SSH_KEY_PATH}", + identityFile: "${env.SSH_KEY_PATH}", allowAnyHosts: true ], command: """ ${env.TOMCAT_HOME}/bin/shutdown.sh || true @@ -98,7 +98,7 @@ pipeline { name: 'Batch Server', host: "${env.SERVER_IP}", user: "${env.SERVER_USER}", - // identityFile: "${env.SSH_KEY_PATH}", + identityFile: "${env.SSH_KEY_PATH}", allowAnyHosts: true ], command: """ if [ -f ${env.BACKUP_FILE} ]; then