Commit c14a8442 authored by 智勇's avatar 智勇

up

parent 394ca4d3
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
project_name=$1 project_name=$1
is_public_ip=$2 is_public_ip=$2
ip=$3 ip=$3
idc=$4
pwd_path="/home/qa-deploy-utils/qa_shell_script" pwd_path="/home/qa-deploy-utils/qa_shell_script"
config_shell_path="$pwd_path" config_shell_path="$pwd_path"
config_server="$pwd_path/config_server" config_server="$pwd_path/config_server"
...@@ -15,7 +16,7 @@ if [ -z "$project_name" ];then ...@@ -15,7 +16,7 @@ if [ -z "$project_name" ];then
fi fi
if [ "$project_type" = "java" ]; then if [ "$project_type" = "java" ]; then
sh $pwd_path/base_script/restartJava.sh $project_name $config_server $project_path $ip sh $pwd_path/base_script/restartJava.sh $project_name $config_server $project_path $ip $idc
# restartJavaProject $project_name $3 # restartJavaProject $project_name $3
elif [ "$project_type" = "node" ]; then elif [ "$project_type" = "node" ]; then
sh $pwd_path/base_script/restartNode.sh $project_name $config_server $project_path $ip sh $pwd_path/base_script/restartNode.sh $project_name $config_server $project_path $ip
...@@ -24,6 +25,6 @@ elif [ "$project_type" = "python" ]; then ...@@ -24,6 +25,6 @@ elif [ "$project_type" = "python" ]; then
sh $pwd_path/base_script/restartPython.sh $project_name $config_server $project_path $ip sh $pwd_path/base_script/restartPython.sh $project_name $config_server $project_path $ip
# restartPythonProject $project_name $3 # restartPythonProject $project_name $3
elif [ "$project_type" = "ui" ]; then elif [ "$project_type" = "ui" ]; then
sh $pwd_path/base_script/restartUi.sh $project_name $config_server $project_path $ip sh $pwd_path/base_script/restartUi.sh $project_name $config_server $project_path $ip
# restartUiProject $project_name $3 # restartUiProject $project_name $3
fi fi
...@@ -3,7 +3,8 @@ project=$1 ...@@ -3,7 +3,8 @@ project=$1
config_server=$2 config_server=$2
project_path=$3 project_path=$3
ip=$4 ip=$4
wechat_config=$5 idc=$5
if [ -z $idc ];then idc=default;fi
profile=test profile=test
time=`date +%Y_%m_%d_%H_%M_%S` time=`date +%Y_%m_%d_%H_%M_%S`
config_path=/home/config_files config_path=/home/config_files
...@@ -106,8 +107,9 @@ mv $project_path/logs/$log_name $project_path/logs/$log_name.$time ...@@ -106,8 +107,9 @@ mv $project_path/logs/$log_name $project_path/logs/$log_name.$time
command1=${run_commands[0]//\^/ } command1=${run_commands[0]//\^/ }
command2=${run_commands[1]//\^/ } command2=${run_commands[1]//\^/ }
echo "nohup java $command1 $wechat_config -jar ${project}.jar $command2" command=`echo "nohup java $command1 $idc -jar ${project}.jar $command2" | sed 's#-Didc=default#-Didc=$idc#g'`
nohup java $command1 $wechat_config -jar ${project}.jar $command2 > /dev/null 2>&1 & echo $command
$command > /dev/null 2>&1 &
echo "日志名称:$log_name" echo "日志名称:$log_name"
#if [[ $project == "redpacket" ]]; then #if [[ $project == "redpacket" ]]; then
......
...@@ -3,6 +3,7 @@ project_name=$1 ...@@ -3,6 +3,7 @@ project_name=$1
branch_name=$2 branch_name=$2
public_ip=$3 public_ip=$3
ip=$4 ip=$4
idc=$5
if [ -z "$project_name" ];then if [ -z "$project_name" ];then
echo "清输入项目名称" echo "清输入项目名称"
...@@ -33,7 +34,7 @@ else ...@@ -33,7 +34,7 @@ else
exit -1 exit -1
fi fi
sh /home/qa-deploy-utils/qa_shell_script/5_restart_by_name.sh $project_name $public_ip $ip sh /home/qa-deploy-utils/qa_shell_script/5_restart_by_name.sh $project_name $public_ip $ip $idc
if [ $? = 0 ]; then if [ $? = 0 ]; then
echo "--- $ip $project_name 5_restart_by_name ok ---" echo "--- $ip $project_name 5_restart_by_name ok ---"
else else
......
...@@ -23,7 +23,7 @@ if [ -n "$project_name" ] && [ -n "$branch_name" ]; then ...@@ -23,7 +23,7 @@ if [ -n "$project_name" ] && [ -n "$branch_name" ]; then
expect \"]#\" expect \"]#\"
send \"cd /home/qa-deploy-utils/qa_shell_script\r\" send \"cd /home/qa-deploy-utils/qa_shell_script\r\"
expect \"]#\" expect \"]#\"
send \"sh deploy_project_by_name.sh $project_name $branch_name $public_ip ${ip_host}\r\" send \"sh deploy_project_by_name.sh $project_name $branch_name $public_ip ${ip_host} ${apollo_idc}\r\"
set timeout -1 set timeout -1
expect \"]#\" expect \"]#\"
send \"exit\r\" send \"exit\r\"
......
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