Commit da7961e5 authored by QA-甘 盛聪's avatar QA-甘 盛聪

update

parent 0b1e354c
#!/bin/bash
project_name=$1
branch_name=$2
public_ip=$3
sh 2_get_code_by_type.sh $project_name $branch_name
if [[ $? == 128 ]]; then
echo "Invalid argument to exit"
exit
fi
sh 3_link_config_file_by_type.sh $project_name $public_ip
sh 4_build_by_type.sh $project_name $public_ip
sh 5_restart_by_type.sh $project_name $public_ip
\ No newline at end of file
......@@ -15,21 +15,21 @@ project_type : ${project_type}
public_ip : ${public_ip}
"
#初始化脚本环境
if $init_shell_script ;then
expect -c "
set timeout 10
spawn ssh root@${ip}
expect *ssword* { send !QAZ2wsx\r }
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 $init_shell_script ;then
# expect -c "
# set timeout 10
# spawn ssh root@${ip}
# expect *ssword* { send !QAZ2wsx\r }
# 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
......@@ -54,17 +54,7 @@ else
expect \"]#\"
send \"cd /home/qa-deploy-utils/qa_shell_script\r\"
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 $public_ip\r\"
set timeout -1
expect \"]#\"
send \"sh 4_build_by_type.sh $project_type $public_ip\r\"
set timeout -1
expect \"]#\"
send \"sh 5_restart_by_type.sh $project_type $public_ip\r\"
set timeout -1
send \"sh deploy_project_by_type $project_type $branch_name $public_ip\r\"
expect \"]#\"
send \"exit\r\"
expect eof;"
......
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