一:General
项目介绍:如XXX后台管理系统
二:源码管理
填写git地址
三:构建触发器
四:构建环境
可不选
五:Pre Steps(构建之前)
清除缓存
Post Steps(构建之后)
构建之后传输到另一个服务器上
启动程序的start.sh文件
echo "hello web.jar"
DAY=`date +%Y-%m-%d`
pid=`ps -ef|grep web.jar|grep -v grep|awk '{print $2}'`
if [ -n "$pid" ]
then
echo 'The pid: server' $pid ' will be killed....'
kill -9 $pid
echo 'The pid: server' $pid ' will be start'
nohup java -jar /data1/imcloud/web/web.jar > /data1/imcloud/web/log.out &
else
echo 'The pid: server' $pid ' not exist , will be start'
nohup java -jar /data1/imcloud/web/web.jar > /data1/imcloud/web/log.out &
fi
echo 'The pid: server' $pid ' started'