美文网首页
jenkins中编译中要运行的脚本

jenkins中编译中要运行的脚本

作者: 中國壹石頭 | 来源:发表于2015-09-04 19:14 被阅读56次

BUILD_ID=dontKillMe

rm -fr /home/jenkins/release/${JOB_NAME}/lib
rm -fr /home/jenkins/release/${JOB_NAME}/conf_app
rm -fr /home/jenkins/release/${JOB_NAME}/m10_app_server-0.0.1-SNAPSHOT.jar

mkdir -p /home/jenkins/release/${JOB_NAME}
cp -fr cow-server/m10_app_server/target/m10_app_server-0.0.1-SNAPSHOT.jar /home/jenkins/release/${JOB_NAME}/m10_app_server-0.0.1-SNAPSHOT.jar
cp -fr cow-server/m10_app_server/target/lib /home/jenkins/release/${JOB_NAME}/lib

cd /home/jenkins/release/${JOB_NAME}

/usr/sbin/daemonize -e ddd.log -o ddd.log -c /home/jenkins/release/${JOB_NAME}/ /home/jenkins/release/${JOB_NAME}/restart.sh

pidno=ps -ef | grep -e m10_app_server-0.0.1-SNAPSHOT.jar | grep -v grep | awk '{print $2}'
if [ "$pidno"x = ""x ];
then
echo "server not running"
else
kill -9 $pidno
fi
nohup java -jar m10_app_server-0.0.1-SNAPSHOT.jar -i1 -h192.168.0.113 > server.log &
echo date - restarting ais>> restart.log

QQ图片20150911100709.jpg

相关文章

网友评论

      本文标题:jenkins中编译中要运行的脚本

      本文链接:https://www.haomeiwen.com/subject/ulwlcttx.html