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
da7961e5
Commit
da7961e5
authored
Feb 15, 2017
by
QA-甘 盛聪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
0b1e354c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
26 deletions
+29
-26
deploy_project_by_type.sh
qa_shell_script/deploy_project_by_type.sh
+13
-0
remote_excute.sh
qa_shell_script/remote_excute.sh
+16
-26
No files found.
qa_shell_script/deploy_project_by_type.sh
0 → 100644
View file @
da7961e5
#!/bin/bash
project_name
=
$1
branch_name
=
$2
public_ip
=
$3
sh 2_get_code_by_type.sh
$project_name
$branch_name
if
[[
$?
==
128
]]
;
then
echo
"Invalid argument to exit"
exit
fi
sh 3_link_config_file_by_type.sh
$project_name
$public_ip
sh 4_build_by_type.sh
$project_name
$public_ip
sh 5_restart_by_type.sh
$project_name
$public_ip
\ No newline at end of file
qa_shell_script/remote_excute.sh
View file @
da7961e5
...
...
@@ -15,21 +15,21 @@ project_type : ${project_type}
public_ip :
${
public_ip
}
"
#初始化脚本环境
if
$init_shell_script
;
then
expect
-c
"
set timeout 10
spawn ssh root@
${
ip
}
expect *ssword* { send !QAZ2wsx
\r
}
expect
\"
]#
\"
send
\"
rm -rf /home/qa-deploy-utils/qa_shell_script
\r\"
expect
\"
]#
\"
send
\"
cd /home
\r\"
expect
\"
]#
\"
send
\"
git clone http://shengcong.gan:12345678@gitabc.xyqb.com/QA/qa-deploy-utils.git
\r\"
expect
\"
]#
\"
send
\"
exit
\r\"
expect eof;"
fi
#
if $init_shell_script ;then
#
expect -c "
#
set timeout 10
#
spawn ssh root@${ip}
#
expect *ssword* { send !QAZ2wsx\r }
#
expect \"]#\"
#
send \"rm -rf /home/qa-deploy-utils/qa_shell_script\r\"
#
expect \"]#\"
#
send \"cd /home\r\"
#
expect \"]#\"
#
send \"git clone http://shengcong.gan:12345678@gitabc.xyqb.com/QA/qa-deploy-utils.git\r\"
#
expect \"]#\"
#
send \"exit\r\"
#
expect eof;"
#
fi
...
...
@@ -54,17 +54,7 @@ else
expect
\"
]#
\"
send
\"
cd /home/qa-deploy-utils/qa_shell_script
\r\"
expect
\"
]#
\"
send
\"
sh 2_get_code_by_type.sh
$project_type
$branch_name
\r\"
set timeout -1
expect
\"
]#
\"
send
\"
sh 3_link_config_file_by_type.sh
$project_type
$public_ip
\r\"
set timeout -1
expect
\"
]#
\"
send
\"
sh 4_build_by_type.sh
$project_type
$public_ip
\r\"
set timeout -1
expect
\"
]#
\"
send
\"
sh 5_restart_by_type.sh
$project_type
$public_ip
\r\"
set timeout -1
send
\"
sh deploy_project_by_type
$project_type
$branch_name
$public_ip
\r\"
expect
\"
]#
\"
send
\"
exit
\r\"
expect eof;"
...
...
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