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
907c7adf
Commit
907c7adf
authored
May 22, 2017
by
智勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
2c3b5f54
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
5_restart_by_type.sh
qa_shell_script/5_restart_by_type.sh
+4
-4
remote_excute.sh
qa_shell_script/remote_excute.sh
+1
-1
No files found.
qa_shell_script/5_restart_by_type.sh
View file @
907c7adf
...
@@ -26,7 +26,7 @@ function restartJavaProject()
...
@@ -26,7 +26,7 @@ function restartJavaProject()
cd
$project_path
/
$project
cd
$project_path
/
$project
P_UUID
=
`
ps
-ef
|grep
${
project
}
.jar |grep
-v
'grep'
|awk
'{print $2}'
`
P_UUID
=
`
ps
-ef
|grep
${
project
}
.jar |grep
-v
'grep'
|awk
'{print $2}'
`
if
[
-n
"
${
P_UUID
}
"
]
;
then
if
[
-n
"
${
P_UUID
}
"
]
;
then
echo
"
-----
KILL
$project
PPID=
${
P_UUID
}
"
echo
"KILL
$project
PPID=
${
P_UUID
}
"
echo
`
kill
-9
${
P_UUID
}
`
echo
`
kill
-9
${
P_UUID
}
`
sleep
2s
sleep
2s
fi
fi
...
@@ -35,9 +35,9 @@ function restartJavaProject()
...
@@ -35,9 +35,9 @@ function restartJavaProject()
config_file
=
`
find ./
-maxdepth
2
-name
"application.properties"
`
config_file
=
`
find ./
-maxdepth
2
-name
"application.properties"
`
if
[
-n
"
$config_file
"
]
if
[
-n
"
$config_file
"
]
then
then
echo
"
have
"
echo
"
already have application.properties
"
else
else
echo
"no have"
echo
"no have
application.properties
"
if
$is_public_ip
&&
[
-n
"
$is_public_ip
"
]
if
$is_public_ip
&&
[
-n
"
$is_public_ip
"
]
then
then
echo
"ln -s
$config_path
/public/java/
${
project
}
.* /home/quant_group/
${
project
}
/application.properties"
echo
"ln -s
$config_path
/public/java/
${
project
}
.* /home/quant_group/
${
project
}
/application.properties"
...
@@ -106,7 +106,7 @@ function restartPythonProject()
...
@@ -106,7 +106,7 @@ function restartPythonProject()
P_UUID
=
`
ps
-ef
|grep
port
=
$port
|grep
-v
'grep'
|awk
'{print $2}'
`
P_UUID
=
`
ps
-ef
|grep
port
=
$port
|grep
-v
'grep'
|awk
'{print $2}'
`
if
[[
"
${
P_UUID
}
"
!=
""
]]
;
then
if
[[
"
${
P_UUID
}
"
!=
""
]]
;
then
echo
"
-----
KILL
$project
PPID=
${
P_UUID
}
"
echo
"KILL
$project
PPID=
${
P_UUID
}
"
echo
`
kill
-9
${
P_UUID
}
`
echo
`
kill
-9
${
P_UUID
}
`
sleep
3
sleep
3
fi
fi
...
...
qa_shell_script/remote_excute.sh
View file @
907c7adf
...
@@ -23,7 +23,7 @@ if [ -n "$project_name" ] && [ -n "$branch_name" ]; then
...
@@ -23,7 +23,7 @@ if [ -n "$project_name" ] && [ -n "$branch_name" ]; then
expect
\"
]#
\"
expect
\"
]#
\"
send
\"
cd /home/qa-deploy-utils/qa_shell_script
\r\"
send
\"
cd /home/qa-deploy-utils/qa_shell_script
\r\"
expect
\"
]#
\"
expect
\"
]#
\"
send
\"
sh deploy_project_by_name.sh
$project_name
$branch_name
$public_ip
\r\"
send
\"
sh deploy_project_by_name.sh
$project_name
$branch_name
$public_ip
$ip
\r\"
set timeout -1
set timeout -1
expect
\"
]#
\"
expect
\"
]#
\"
send
\"
exit
\r\"
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