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
c14a8442
Commit
c14a8442
authored
Jan 18, 2018
by
智勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
up
parent
394ca4d3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
7 deletions
+11
-7
5_restart_by_name.sh
qa_shell_script/5_restart_by_name.sh
+3
-2
restartJava.sh
qa_shell_script/base_script/restartJava.sh
+5
-3
deploy_project_by_name.sh
qa_shell_script/deploy_project_by_name.sh
+2
-1
remote_excute.sh
qa_shell_script/remote_excute.sh
+1
-1
No files found.
qa_shell_script/5_restart_by_name.sh
View file @
c14a8442
...
...
@@ -2,6 +2,7 @@
project_name
=
$1
is_public_ip
=
$2
ip
=
$3
idc
=
$4
pwd_path
=
"/home/qa-deploy-utils/qa_shell_script"
config_shell_path
=
"
$pwd_path
"
config_server
=
"
$pwd_path
/config_server"
...
...
@@ -15,7 +16,7 @@ if [ -z "$project_name" ];then
fi
if
[
"
$project_type
"
=
"java"
]
;
then
sh
$pwd_path
/base_script/restartJava.sh
$project_name
$config_server
$project_path
$ip
sh
$pwd_path
/base_script/restartJava.sh
$project_name
$config_server
$project_path
$ip
$idc
# restartJavaProject $project_name $3
elif
[
"
$project_type
"
=
"node"
]
;
then
sh
$pwd_path
/base_script/restartNode.sh
$project_name
$config_server
$project_path
$ip
...
...
@@ -24,6 +25,6 @@ elif [ "$project_type" = "python" ]; then
sh
$pwd_path
/base_script/restartPython.sh
$project_name
$config_server
$project_path
$ip
# restartPythonProject $project_name $3
elif
[
"
$project_type
"
=
"ui"
]
;
then
sh
$pwd_path
/base_script/restartUi.sh
$project_name
$config_server
$project_path
$ip
sh
$pwd_path
/base_script/restartUi.sh
$project_name
$config_server
$project_path
$ip
# restartUiProject $project_name $3
fi
qa_shell_script/base_script/restartJava.sh
View file @
c14a8442
...
...
@@ -3,7 +3,8 @@ project=$1
config_server
=
$2
project_path
=
$3
ip
=
$4
wechat_config
=
$5
idc
=
$5
if
[
-z
$idc
]
;
then
idc
=
default
;
fi
profile
=
test
time
=
`
date
+%Y_%m_%d_%H_%M_%S
`
config_path
=
/home/config_files
...
...
@@ -106,8 +107,9 @@ mv $project_path/logs/$log_name $project_path/logs/$log_name.$time
command1
=
${
run_commands
[0]//\^/
}
command2
=
${
run_commands
[1]//\^/
}
echo
"nohup java
$command1
$wechat_config
-jar
${
project
}
.jar
$command2
"
nohup
java
$command1
$wechat_config
-jar
${
project
}
.jar
$command2
>
/dev/null 2>&1 &
command
=
`
echo
"nohup java
$command1
$idc
-jar
${
project
}
.jar
$command2
"
|
sed
's#-Didc=default#-Didc=$idc#g'
`
echo
$command
$command
>
/dev/null 2>&1 &
echo
"日志名称:
$log_name
"
#if [[ $project == "redpacket" ]]; then
...
...
qa_shell_script/deploy_project_by_name.sh
View file @
c14a8442
...
...
@@ -3,6 +3,7 @@ project_name=$1
branch_name
=
$2
public_ip
=
$3
ip
=
$4
idc
=
$5
if
[
-z
"
$project_name
"
]
;
then
echo
"清输入项目名称"
...
...
@@ -33,7 +34,7 @@ else
exit
-1
fi
sh /home/qa-deploy-utils/qa_shell_script/5_restart_by_name.sh
$project_name
$public_ip
$ip
sh /home/qa-deploy-utils/qa_shell_script/5_restart_by_name.sh
$project_name
$public_ip
$ip
$idc
if
[
$?
=
0
]
;
then
echo
"---
$ip
$project_name
5_restart_by_name ok ---"
else
...
...
qa_shell_script/remote_excute.sh
View file @
c14a8442
...
...
@@ -23,7 +23,7 @@ if [ -n "$project_name" ] && [ -n "$branch_name" ]; then
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_host
}
\r\"
send
\"
sh deploy_project_by_name.sh
$project_name
$branch_name
$public_ip
${
ip_host
}
${
apollo_idc
}
\r\"
set timeout -1
expect
\"
]#
\"
send
\"
exit
\r\"
...
...
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