Commit da9bdc9a authored by 温海元's avatar 温海元

add some script

parent 651cc4d2
...@@ -3,17 +3,21 @@ target_dir="/home/quant_group/${project_name}" ...@@ -3,17 +3,21 @@ target_dir="/home/quant_group/${project_name}"
qaapi='http://172.30.220.22:3003' qaapi='http://172.30.220.22:3003'
git_path=`curl -s "${qaapi}/proconfig/get_info?system_name=${project_name}&key=git_path"` git_path=`curl -s "${qaapi}/proconfig/get_info?system_name=${project_name}&key=git_path"`
cd ${target_dir}
echo "目录切换到 ${target_dir}"
if [ ! -d "$project_name" ];then if [ ! -d "$project_name" ];then
echo "not exist" echo "项目不存在"
git clone ${git_path} git clone ${git_path}
cd ./${project_name} cd ./${project_name}
else else
echo "exist" echo "项目已存在"
cd ./${project_name} cd ./${project_name}
git pull git pull
fi fi
echo "部署项目开始" echo "开始部署项目"
if [ "$project_name" = "qa-platform-ui" ];then if [ "$project_name" = "qa-platform-ui" ];then
echo "这是一个UI项目" echo "这是一个UI项目"
...@@ -24,6 +28,7 @@ if [ "$project_name" = "qa-platform-ui" ];then ...@@ -24,6 +28,7 @@ if [ "$project_name" = "qa-platform-ui" ];then
else else
echo "这是JAVA项目" echo "这是JAVA项目"
cd ${target_dir} cd ${target_dir}
git pull
mvn clean package -Ptest -Dmaven.test.skip=true mvn clean package -Ptest -Dmaven.test.skip=true
supervisorctl restart $project_name supervisorctl restart $project_name
echo "done" echo "done"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment