系统相关
首页 > 系统相关> > 【转】解决jenkins自动杀掉衍生进程

【转】解决jenkins自动杀掉衍生进程

作者:互联网

在执行 shell输入框中加入BUILD_ID=dontKillMe ,即可防止jenkins杀死启动的进程

 

 1 export BUILD_ID=dontKillMe
 2 PROJECT_LOCATION="/usr/local/project/"
 3 HOST=$HOST
 4 
 5  6 
 7  8 
 9 rsync -avz --delete --progress --exclude "config*" --exclude "db" ${WORKSPACE}/  root@${HOST}:$PROJECT_LOCATION
10 
11 ssh -tt root@${HOST}  "    
12     cd $PROJECT_LOCATION
13     14 15     nohup ./server >server.log 2>&1 &
16      sleep 10
17      exit 
18     
19 "

 

标签:杀掉,BUILD,PROJECT,HOST,LOCATION,exclude,jenkins,衍生,dontKillMe
来源: https://www.cnblogs.com/HYanqing/p/12104057.html