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
f23cc168
Commit
f23cc168
authored
Feb 15, 2017
by
QA-甘 盛聪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
ce839871
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
10 deletions
+39
-10
1_mount_config_files.sh
qa_shell_script/1_mount_config_files.sh
+35
-6
2_get_code_by_name.sh
qa_shell_script/2_get_code_by_name.sh
+1
-1
2_get_code_by_type.sh
qa_shell_script/2_get_code_by_type.sh
+1
-0
remote_excute.sh
qa_shell_script/remote_excute.sh
+2
-3
No files found.
qa_shell_script/1_mount_config_files.sh
View file @
f23cc168
...
...
@@ -18,14 +18,43 @@
# exit -1
# fi
#done
target_ip
=
$1
IP_host_first
=
"192.168.4."
config_files
=
/home/config_files
for
ip_last_num
in
12 13 14 15 16 17 24 151
do
expect
-c
"
if
[[
target_ip
==
"ALL"
]]
;
then
for
ip_last_num
in
12 13 14 15 16 17 24 151
do
expect
-c
"
set timeout 10
spawn ssh root@
${
IP_host_first
}${
ip_last_num
}
expect *ssword* { send !QAZ2wsx
\r
}
expect
\"
]#
\"
send
\"
mkdir -p /home/qa-deploy-utils/qa_shell_script
\r\"
set timeout -1
expect
\"
]#
\"
send
\"
mount -t nfs 192.168.4.3:/home/qa-deploy-utils/qa_shell_script /home/qa-deploy-utils/qa_shell_script
\r\"
set timeout -1
expect
\"
]#
\"
send
\"
umount
$config_files
\r\"
set timeout -1
expect
\"
]#
\"
send
\"
rm -rf
$config_files
\r\"
set timeout -1
expect
\"
]#
\"
send
\"
mkdir
$config_files
\r\"
set timeout -1
expect
\"
]#
\"
send
\"
mount -t nfs 192.168.4.3:/home/sub_config_file_dont_rm/
${
IP_host_first
}${
ip_last_num
}
/
$config_files
\r\"
set timeout -1
expect
\"
]#
\"
send
\"
exit
\r\"
expect eof;"
done
else
expect
-c
"
set timeout 10
spawn ssh root@
${
IP_host_first
}${
ip_last_num
}
spawn ssh root@
${
IP_host_first
}${
target_ip
}
expect *ssword* { send !QAZ2wsx
\r
}
expect
\"
]#
\"
send
\"
mkdir -p /home/qa-deploy-utils/qa_shell_script
\r\"
...
...
@@ -48,4 +77,4 @@ do
expect
\"
]#
\"
send
\"
exit
\r\"
expect eof;"
done
\ No newline at end of file
fi
qa_shell_script/2_get_code_by_name.sh
View file @
f23cc168
...
...
@@ -21,7 +21,7 @@ if [ -n "$project_folder" ];then
git pull
else
echo
"Fail to checkout branch
$git_branch
"
.
exit
1
exit
1
28
fi
else
echo
"checkout default branch master"
...
...
qa_shell_script/2_get_code_by_type.sh
View file @
f23cc168
...
...
@@ -24,6 +24,7 @@ function getCode()
echo
"checkout branch
$git_branch
is ok"
.
else
echo
"Fail to checkout branch
$git_branch
"
.
exit
128
fi
git pull
else
...
...
qa_shell_script/remote_excute.sh
View file @
f23cc168
...
...
@@ -32,6 +32,8 @@ if $init_shell_script ;then
expect eof;"
fi
if
[
-n
"
$project_name
"
]
&&
[
-n
"
$branch_name
"
]
;
then
expect
-c
"
set timeout 10
...
...
@@ -40,9 +42,6 @@ if [ -n "$project_name" ] && [ -n "$branch_name" ]; then
expect
\"
]#
\"
send
\"
cd /home/qa-deploy-utils/qa_shell_script
\r\"
expect
\"
]#
\"
send
\"
sh 1_mount_config_files.sh
\r\"
set timeout -1
expect
\"
]#
\"
send
\"
sh 2_get_code_by_name.sh
$project_name
$branch_name
\r\"
set timeout -1
expect
\"
]#
\"
...
...
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