Commit 0805d0b5 authored by 智勇's avatar 智勇

更新为sshpass方式

parent 2119972f
#!/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}
"
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