|
@@ -62,13 +62,7 @@ def call(Map args = [:]) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/* 4. 启动新进程 */
|
|
/* 4. 启动新进程 */
|
|
|
- sh """
|
|
|
|
|
- ssh -o StrictHostKeyChecking=no ${remoteHost} '
|
|
|
|
|
- cd ${remotePath} &&
|
|
|
|
|
- nohup java ${jvmArgs} -jar ${jarName} --spring.profiles.active=${profile} > server.log 2>&1 &
|
|
|
|
|
- sleep 5
|
|
|
|
|
- '
|
|
|
|
|
- """
|
|
|
|
|
|
|
+ sh """ssh -o StrictHostKeyChecking=no ${remoteHost} "sh -c 'cd ${remotePath} && nohup java ${jvmArgs} -jar ${jarName} --spring.profiles.active=${profile} > server.log 2>&1 &'" """
|
|
|
|
|
|
|
|
/* 5. 按 profile 精确校验:有且仅有 1 个进程 */
|
|
/* 5. 按 profile 精确校验:有且仅有 1 个进程 */
|
|
|
String procCount = sh(
|
|
String procCount = sh(
|