Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qa-deploy-utils
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QA
qa-deploy-utils
Commits
ba6ca210
Commit
ba6ca210
authored
Aug 08, 2017
by
qa_quantgroup
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加服务部署和服务重启脚本
parent
006c513b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
2 deletions
+64
-2
delete_All_Data.sh
qa_shell_script/script_by_Contorller/delete_All_Data.sh
+2
-2
remote_excute.sh
qa_shell_script/script_by_Contorller/remote_excute.sh
+43
-0
remote_excute_start.sh
qa_shell_script/script_by_Contorller/remote_excute_start.sh
+19
-0
No files found.
qa_shell_script/script_by_Contorller/delete_All_Data.sh
View file @
ba6ca210
...
...
@@ -30,7 +30,7 @@ function deleteAlldata()
mysql
$mysqld
${
DBNAME
}
-e
"delete from contact where user_id=
$xyqb_user_id
"
mysql
$mysqld
${
DBNAME
}
-e
"delete from user_ext_info where user_id=
$xyqb_user_id
"
mysql
$mysqld
${
DBNAME
}
-e
"delete from wechat_userinfo where user_id=
$xyqb_user_id
"
echo
"删除xyqb数据,xyqb_user_id=
$xyqb_user_id
,loan_id=
$loan_id
"
mysql
$mysqld
${
DBNAME2
}
-e
"delete from user_contact where user_id=
$xyqb_user_id
"
mysql
$mysqld
${
DBNAME2
}
-e
"delete from loan_application_history where user_id=
$xyqb_user_id
"
...
...
@@ -54,7 +54,7 @@ function deleteAlldata()
mysql
$mysqld
${
DBNAME2
}
-e
"delete from user_finance_history where loan_application_history_id in (
$loan_id
)"
mysql
$mysqld
${
DBNAME2
}
-e
"delete from waiting_for_assignment where loan_application_history_id in (
$loan_id
)"
mysql
$mysqld
${
DBNAME2
}
-e
"delete from waiting_funding_corp_operate_people where loan_application_history_id in (
$loan_id
)"
echo
"删除cash-loan-flow数据"
mysql
$mysqld
cash_loan_flow
-e
"delete from order_progress_record where loan_id in (
$loan_id
)"
fi
...
...
qa_shell_script/script_by_Contorller/remote_excute.sh
0 → 100644
View file @
ba6ca210
#!/bin/bash
ip
=
$1
project_name
=
$2
branch_name
=
$3
project_type
=
$4
public_ip
=
$5
set timeout
1200
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
expect
-c
"
set timeout 10
spawn ssh root@
${
ip
}
expect
\"
]#
\"
send
\"
cd /home/qa-deploy-utils/qa_shell_script
\r\"
expect
\"
]#
\"
send
\"
sh deploy_project_by_name.sh
$project_name
$branch_name
$public_ip
$ip
\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 deploy_project_by_type.sh
$project_type
$branch_name
$public_ip
$ip
\r\"
set timeout -1
expect
\"
]#
\"
send
\"
exit
\r\"
expect eof;"
fi
qa_shell_script/script_by_Contorller/remote_excute_start.sh
0 → 100644
View file @
ba6ca210
#!/bin/bash
#project_path=`cat $config_server/get_env_ip.sh`
IP
=
$1
project_name
=
$2
if
[
-n
"
$IP
"
]
;
then
expect
-c
"
set timeout 10
spawn ssh root@
${
IP
}
expect
\"
]#
\"
send
\"
sh /home/qa-deploy-utils/qa_shell_script/6_start_by_name.sh
$project_name
\r\"
set timeout -1
expect
\"
]#
\"
send
\"
exit
\r\"
expect eof;"
else
echo
"请输入有效的ip地址"
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment