Commit 5bbec943 authored by qa_quantgroup's avatar qa_quantgroup

update

parent 06bb1f09
File deleted
...@@ -146,7 +146,9 @@ tranceConfig ui "wx89894cd83d117b26" "wxc94ca68b353e90d0" "192.168.4.24" "activi ...@@ -146,7 +146,9 @@ tranceConfig ui "wx89894cd83d117b26" "wxc94ca68b353e90d0" "192.168.4.24" "activi
#4.25 #4.25
tranceConfig ui "wechattest.xyqb.com" "xyqb-user2-25.q-gp.com" "192.168.4.25" "xyqb-user-ui.js" tranceConfig ui "wechattest.xyqb.com" "xyqb-user2-25.q-gp.com" "192.168.4.25" "xyqb-user-ui.js"
tranceConfig java "wx89894cd83d117b26" "wx9d259d369c88bf31" "192.168.4.25" "xyqb-user2.properties"
tranceConfig java "11fb7f6a8b8edf2776a72c2f5624229c" "2c1603ace1d6e7ae1f0c376cf7bcd72e" "192.168.4.25" "xyqb-user2.properties"
tranceConfig ui "wx89894cd83d117b26" "wx9d259d369c88bf31" "192.168.4.25" "xyqb-user-ui.js"
#4.26 #4.26
tranceConfig java "ygziguan.api.url=http://139.198.0.253/receiver/grequest" "ygziguan.api.url=http://192.168.4.241/receiver/grequest" "192.168.4.26" "fund-manage.properties" tranceConfig java "ygziguan.api.url=http://139.198.0.253/receiver/grequest" "ygziguan.api.url=http://192.168.4.241/receiver/grequest" "192.168.4.26" "fund-manage.properties"
......
...@@ -4,7 +4,6 @@ cd $JENKINS_HOME/jobs/$JOB_BASE_NAME/builds/${BUILD_NUMBER} ...@@ -4,7 +4,6 @@ cd $JENKINS_HOME/jobs/$JOB_BASE_NAME/builds/${BUILD_NUMBER}
echo "Java程序启动时间统计:" echo "Java程序启动时间统计:"
grep "started ok in" log grep "started ok in" log
echo echo
echo "失败的部署步骤如下:"
grep " fail ---" log grep " fail ---" log
if [ $? = 0 ];then if [ $? = 0 ];then
exit -1 exit -1
......
#!/bin/bash
init_shell_script=$1
ip_last=$2
project_name=$3
is_reload_config=$4
project_type=$5
set timeout 1200
ip=192.168.4.$ip_last
echo "参数为:
init_shell_script: ${init_shell_script}
ip : ${ip}
project_name : ${project_name}
is_reload_config : ${is_reload_config}
project_type : ${project_type}
"
#初始化脚本环境
if $init_shell_script ;then
expect -c "
set timeout 10
spawn ssh root@${ip}
expect \"]#\"
send \"rm -rf /home/qa-deploy-utils/qa_shell_script\r\"
expect \"]#\"
send \"cd /home\r\"
expect \"]#\"
send \"git clone http://shengcong.gan:12345678@gitabc.xyqb.com/QA/qa-deploy-utils.git\r\"
expect \"]#\"
send \"exit\r\"
expect eof;"
fi
if [ -n "$project_name" ]; then
expect -c "
set timeout 10
spawn ssh root@${ip}
expect \"]#\"
send \"cd /home/qa-deploy-utils/qa_shell_script\r\"
expect \"]#\"
send \"sh 1_mount_config_files.sh\r\"
set timeout -1
expect \"]#\"
send \"sh 2_get_code_by_name.sh $project_name $branch_name\r\"
set timeout -1
expect \"]#\"
send \"sh 3_link_config_file_by_name.sh $project_name\r\"
set timeout -1
expect \"]#\"
send \"sh 4_build_by_name.sh $project_name\r\"
set timeout -1
expect \"]#\"
send \"sh 5_restart_by_name.sh $project_name\r\"
set timeout -1
expect \"]#\"
send \"exit\r\"
expect eof;"
else
expect -c "
set timeout 10
spawn ssh root@${ip}
expect \"]#\"
send \"cd /home/qa-deploy-utils/qa_shell_script\r\"
expect \"]#\"
send \"sh 1_mount_config_files.sh\r\"
set timeout -1
expect \"]#\"
send \"sh 2_get_code_by_type.sh $project_type $branch_name\r\"
set timeout -1
expect \"]#\"
send \"sh 3_link_config_file_by_type.sh $project_type\r\"
set timeout -1
expect \"]#\"
send \"sh 4_build_by_type.sh $project_type\r\"
set timeout -1
expect \"]#\"
send \"sh 5_restart_by_type.sh $project_type\r\"
set timeout -1
expect \"]#\"
send \"exit\r\"
expect eof;"
fi
#!/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}
"
ssh root@${ip} "ifconfig"
if [ -n "$project_name" ] && [ -n "$branch_name" ]; then
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
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