同步代码

This commit is contained in:
sxu 2024-08-27 09:46:06 +08:00
parent 46bf23c7f5
commit e3ff124d9e
2 changed files with 4 additions and 52 deletions

View File

@ -9,29 +9,21 @@ echo "workspace is ${WORKSPACE}"
mv ${WORKSPACE}/sgzb-auth/target/sgzb-auth-nw24.8.3.jar $deploy_path
mv ${WORKSPACE}/sgzb-gateway/target/sgzb-gateway-nw24.8.3.jar $deploy_path
mv ${WORKSPACE}/sgzb-modules/sgzb-system/target/sgzb-modules-system-nw24.8.3.jar $deploy_path
mv ${WORKSPACE}/sgzb-modules/sgzb-base/target/sgzb-modules-base-nw24.8.3.jar $deploy_path
mv ${WORKSPACE}/sgzb-modules/sgzb-file/target/sgzb-modules-file-nw24.8.3.jar $deploy_path
mv ${WORKSPACE}/sgzb-modules/sgzb-material/target/sgzb-modules-material-nw24.8.3.jar $deploy_path
mv ${WORKSPACE}/sgzb-modules/sgzb-material/target/sgzb-modules-material-common-3.0.jar $deploy_path
chmod 777 *.jar
echo "--------moveFile end--------------"
export sgzb_auth_enable=true
export sgzb_gateway_enable=true
export sgzb_modules_system_enable=true
export sgzb_modules_base_enable=false #已去掉base服务
export sgzb_modules_file_enable=false #暂时不需要file服务
export sgzb_modules_material_enable=true
export sgzb_auth_jar=sgzb-auth-nw24.8.3.jar
export sgzb_gateway_jar=sgzb-gateway-nw24.8.3.jar
export sgzb_modules_system_jar=sgzb-modules-system-nw24.8.3.jar
export sgzb_modules_base_jar=sgzb-modules-base-nw24.8.3.jar
export sgzb_modules_file_jar=sgzb-modules-file-nw24.8.3.jar
export sgzb_modules_material_jar=sgzb-modules-material-nw24.8.3.jar
export sgzb_modules_material_jar=sgzb-modules-material-common-3.0.jar
export sgzb_auth_port=49200
export sgzb_gateway_port=49080
export sgzb_modules_base_port=49301
export sgzb_modules_file_port=9300
export sgzb_modules_material_port=49302
export sgzb_modules_system_port=49201
@ -55,6 +47,7 @@ if($auth_service_enable);then
echo "--------auth_service 启动成功--------------"
fi
if($sgzb_gateway_enable);then
echo "--------gateway 开始启动--------------"
echo "--------删除gateway开始--------------"
@ -102,47 +95,6 @@ if($sgzb_modules_system_enable);then
echo "--------sgzb_modules_system 启动成功--------------"
fi
if($sgzb_modules_base_enable);then
echo "--------sgzb_modules_base 开始启动--------------"
echo "--------删除sgzb_modules_base开始--------------"
P_ID=`ps -ef | grep -w $sgzb_modules_base_jar | grep -v "grep" | awk '{print $2}'`
if [ "$P_ID" == "" ]; then
echo "===sgzb_modules_base process not exists or stop success"
else
kill -9 $P_ID
echo "sgzb_modules_base killed success"
fi
echo "--------sgzb_modules_base开始部署--------------"
nohup /usr/lib/jvm/jdk1.8.0_381/bin/java -jar $sgzb_modules_base_jar >/dev/null 2>&1 &
sgzb_modules_base_pid=`lsof -i:$sgzb_modules_base_port|grep "LISTEN"|awk '{print $2}'`
until [ -n "$sgzb_modules_base_pid" ]
do
sgzb_modules_base_pid=`lsof -i:$sgzb_modules_base_port|grep "LISTEN"|awk '{print $2}'`
done
echo "sgzb_modules_base pid is $sgzb_modules_base_pid"
echo "--------sgzb_modules_base 启动成功--------------"
fi
if($sgzb_modules_file_enable);then
echo "--------sgzb_modules_file 开始启动--------------"
echo "--------删除sgzb_modules_file开始--------------"
P_ID=`ps -ef | grep -w $sgzb_modules_file_jar | grep -v "grep" | awk '{print $2}'`
if [ "$P_ID" == "" ]; then
echo "===sgzb_modules_file process not exists or stop success"
else
kill -9 $P_ID
echo "sgzb_modules_file killed success"
fi
echo "--------sgzb_modules_file开始部署--------------"
nohup /usr/lib/jvm/jdk1.8.0_381/bin/java -jar $sgzb_modules_file_jar >/dev/null 2>&1 &
sgzb_modules_file_pid=`lsof -i:$sgzb_modules_file_port|grep "LISTEN"|awk '{print $2}'`
until [ -n "$sgzb_modules_file_pid" ]
do
sgzb_modules_file_pid=`lsof -i:$sgzb_modules_file_port|grep "LISTEN"|awk '{print $2}'`
done
echo "sgzb_modules_file pid is $sgzb_modules_file_pid"
echo "--------sgzb_modules_file 启动成功--------------"
fi
if($sgzb_modules_material_enable);then
echo "--------sgzb_modules_material 开始启动--------------"

View File

@ -32,7 +32,7 @@ echo 'Stop Success!'
fi
MA_RESOURCE_NAME=sgzb-modules-material-nw24.8.3.jar
MA_RESOURCE_NAME=sgzb-modules-material-common-3.0.jar
tpid=`ps -ef|grep $MA_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
if [ ${tpid} ]; then