Commit 7f92531f authored by 智勇's avatar 智勇

update

parent 8d955c0f
...@@ -3,11 +3,11 @@ project_name=$1 ...@@ -3,11 +3,11 @@ project_name=$1
branch_name=$2 branch_name=$2
public_ip=$3 public_ip=$3
sh 2_get_code_by_name.sh $project_name $branch_name sh /home/qa-deploy-utils/qa_shell_script/2_get_code_by_name.sh $project_name $branch_name
if [[ $? == 128 ]]; then if [[ $? == 128 ]]; then
echo "Invalid argument to exit" echo "Invalid argument to exit"
exit exit
fi fi
sh 3_link_config_file_by_name.sh $project_name $public_ip sh /home/qa-deploy-utils/qa_shell_script/3_link_config_file_by_name.sh $project_name $public_ip
sh 4_build_by_name.sh $project_name $public_ip sh /home/qa-deploy-utils/qa_shell_script/4_build_by_name.sh $project_name $public_ip
sh 5_restart_by_name.sh $project_name $public_ip sh /home/qa-deploy-utils/qa_shell_script/5_restart_by_name.sh $project_name $public_ip
\ No newline at end of file
...@@ -67,7 +67,7 @@ tranceConfig java "xyqb.is.debug=0" "xyqb.is.debug=1" "192.168.4.14" "xyqb.prope ...@@ -67,7 +67,7 @@ tranceConfig java "xyqb.is.debug=0" "xyqb.is.debug=1" "192.168.4.14" "xyqb.prope
#tranceConfig java "wx7bf214ccdcbd2e16" "wx0a7c0bce0c3ac523" "192.168.4.15" "gu-bei.properties" #tranceConfig java "wx7bf214ccdcbd2e16" "wx0a7c0bce0c3ac523" "192.168.4.15" "gu-bei.properties"
#tranceConfig java "paycenter.host.url=http:\/\/192.168.4.15:7007" "paycenter.host.url=http:\/\/wechattest1.xyqb.com" "192.168.4.15" "gu-bei.properties" #tranceConfig java "paycenter.host.url=http:\/\/192.168.4.15:7007" "paycenter.host.url=http:\/\/wechattest1.xyqb.com" "192.168.4.15" "gu-bei.properties"
#tranceConfig java "139.198.2.95:1507" "wechattest1.xyqb.com" "192.168.4.15" "gu-bei.properties" #tranceConfig java "139.198.2.95:1507" "wechattest1.xyqb.com" "192.168.4.15" "gu-bei.properties"
tranceConfig java "qgbc-ui.url=http://192.168.4.15:7002" "qgbc-ui.url=http://192.168.4.15:7057" "192.168.4.15" "xyqb.properties" tranceConfig java "xyqb-ui.url=http://192.168.4.15:7001" "xyqb-ui.url=http://192.168.4.15:7057" "192.168.4.15" "xyqb.properties"
#4.16 #4.16
...@@ -103,4 +103,9 @@ tranceConfig java "xyqb-ui.url=http:\/\/192.168.4.151:7001" "xyqb-ui.url=http:\/ ...@@ -103,4 +103,9 @@ tranceConfig java "xyqb-ui.url=http:\/\/192.168.4.151:7001" "xyqb-ui.url=http:\/
tranceConfig node "d45o0qd" "5exp2xo" "192.168.4.152" "op-api.js" tranceConfig node "d45o0qd" "5exp2xo" "192.168.4.152" "op-api.js"
#tranceConfig java "qgbc-ui.url=http:\/\/192.168.4.152:7002" "qgbc-ui.url=http:\/\/192.168.4.152:7050" "192.168.4.152" "xyqb.properties" #tranceConfig java "qgbc-ui.url=http:\/\/192.168.4.152:7002" "qgbc-ui.url=http:\/\/192.168.4.152:7050" "192.168.4.152" "xyqb.properties"
#tranceConfig java "7025" "7003" "192.168.4.152" "baitiao.properties" #tranceConfig java "7025" "7003" "192.168.4.152" "baitiao.properties"
#tranceConfig ui "wechattest.xyqb.com" "wechattest1.xyqb.com" "192.168.4.22" "xyqb-user-ui.js"
tranceConfig java "baitiao_redpacket_notify_url=http:\/\/192.168.4.12:7031\/redpacket\/distribute\/" "baitiao_redpacket_notify_url=http:\/\/192.168.4.12:7031" "192.168.4.12" "baitiao.properties"
tranceConfig nginx "/home/quant_group/paycenter-ui/dist" "/home/quant_group/new-paycenter-ui/dist" "192.168.4.14" "paycenter-ui.conf"
...@@ -3,6 +3,6 @@ ip=`ifconfig eth0 | grep "inet addr" | awk '{ print $2}' | awk -F: '{print $2}'` ...@@ -3,6 +3,6 @@ ip=`ifconfig eth0 | grep "inet addr" | awk '{ print $2}' | awk -F: '{print $2}'`
cd /home cd /home
rm -rf *.sql rm -rf *.sql
mysqldump -u qa -pqatest -A > all.sql mysqldump -u qa -pqatest -A > all.sql
sed -i "s/192.168.4.15/$ip/g" all.sql sed -i "s/$1/$ip/g" all.sql
mysql -u qa -pqatest -A < all.sql mysql -u qa -pqatest -A < all.sql
...@@ -29,3 +29,5 @@ for i in `find . -name "*.log"`; do cat /dev/null >$i; done ...@@ -29,3 +29,5 @@ for i in `find . -name "*.log"`; do cat /dev/null >$i; done
cd /home/quant_group/op-api/logs cd /home/quant_group/op-api/logs
rm -rf *.log.* rm -rf *.log.*
for i in `find . -name "*.log"`; do cat /dev/null >$i; done for i in `find . -name "*.log"`; do cat /dev/null >$i; done
rm -rf /tmp/*
...@@ -57,7 +57,7 @@ function addFile() ...@@ -57,7 +57,7 @@ function addFile()
# port=`node $config_server/get_project_config.js -name $project -attr port` # port=`node $config_server/get_project_config.js -name $project -attr port`
# addFile $project $port $filename # addFile $project $port $filename
#done #done
projects_of_out_proxy=( gu-bei activity-op op-api spider-center di-ting merchant-backend cash-loan-flow xyqb xyqb-quartz xyqb-query qgbc-ui bt-ui xyqb-ui ) projects_of_out_proxy=( gu-bei activity-op op-api spider-center di-ting merchant-backend cash-loan-flow xyqb xyqb-quartz xyqb-query qgbc-ui bt-ui xyqb-ui xyqb-user-ui )
for ip_last in ${ips[@]} for ip_last in ${ips[@]}
......
#!/bin/bash
ip_last=$1
project_name=$2
branch_name=$3
project_type=$4
public_ip=$5
set timeout 1200
ip=192.168.4.$ip_last
echo "参数为:
#init_shell_script: ${init_shell_script}
ip : ${ip}
project_name : ${project_name}
branch_name : ${branch_name}
project_type : ${project_type}
public_ip : ${public_ip}
"
sshpass -p '!QAZ2wsx' ssh root@${ip} "ifconfig"
if [ -n "$project_name" ] && [ -n "$branch_name" ]; then
sshpass -p '!QAZ2wsx' ssh root@${ip}
cd /home/qa-deploy-utils/qa_shell_script
sh /home/qa-deploy-utils/qa_shell_script/deploy_project_by_name.sh $project_name $branch_name $public_ip
else
sshpass -p '!QAZ2wsx' ssh root@${ip}
cd /home/qa-deploy-utils/qa_shell_script
sh /home/qa-deploy-utils/qa_shell_script/deploy_project_by_type.sh $project_type $branch_name $public_ip
fi
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