|
|
@@ -21,11 +21,11 @@ def call(Map args = [:]) {
|
|
|
sh "scp -o StrictHostKeyChecking=no ${jarPath} ${remoteHost}:${remoteJar}"
|
|
|
|
|
|
/* 4. 启动新服务 */
|
|
|
- sh "ssh -o StrictHostKeyChecking=no ${remoteHost} 'cd ${remotePath} && nohup java -jar ${jarName} --spring.profiles.active=${profile} > server.log 2>&1 &'"
|
|
|
+ sh "ssh -o StrictHostKeyChecking=no ${remoteHost} 'cd ${remotePath} && nohup java -jar ${jarName} --spring.profiles.active=${profile} > server.log 2>&1 </dev/null &'"
|
|
|
|
|
|
PrintMes("发布成功 ${jarName}", 'green')
|
|
|
} catch (Exception e) {
|
|
|
PrintMes("发布失败 ${jarName} : ${e.message}", 'red')
|
|
|
- error('deploySpringBoot failed') // 让流水线整体失败
|
|
|
+ error('deploySpringBoot failed')
|
|
|
}
|
|
|
}
|