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
feca6ec4
Commit
feca6ec4
authored
Aug 18, 2017
by
tywldx
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitabc.xyqb.com/QA/qa-deploy-utils
parents
b3654b67
a7a67d50
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
21 deletions
+7
-21
post_build_script.sh
qa_shell_script/jenkins/post_build_script.sh
+3
-18
Git_branch.sh
qa_shell_script/script_by_Contorller/Git_branch.sh
+3
-3
find_branch.sh
qa_shell_script/script_by_Contorller/find_branch.sh
+1
-0
No files found.
qa_shell_script/jenkins/post_build_script.sh
View file @
feca6ec4
#!/bin/bash
#!/bin/bash
cd
$JENKINS_HOME
/jobs/
$JOB_BASE_NAME
/builds/
${
BUILD_NUMBER
}
cd
$JENKINS_HOME
/jobs/
$JOB_BASE_NAME
/builds/
${
BUILD_NUMBER
}
res
=
`
grep
"2_get_code_by_name fail"
log
`
grep
"_by_name fail"
log
if
[
-n
"
$res
"
]
;
then
if
[
$?
=
0
]
;
then
echo
"2_get_code_by_name fail"
exit
-1
fi
res
=
`
grep
"3_link_config_file_by_name fail"
log
`
if
[
-n
"
$res
"
]
;
then
echo
"3_link_config_file_by_name fail"
exit
-1
fi
res
=
`
grep
"4_build_by_name fail"
log
`
if
[
-n
"
$res
"
]
;
then
echo
"4_build_by_name fail"
exit
-1
fi
res
=
`
grep
"5_restart_by_name fail"
log
`
if
[
-n
"
$res
"
]
;
then
echo
"5_restart_by_name fail"
exit
-1
exit
-1
fi
fi
echo
"post_build_script finish"
qa_shell_script/script_by_Contorller/Git_branch.sh
View file @
feca6ec4
...
@@ -10,20 +10,20 @@ function Git_branch(){
...
@@ -10,20 +10,20 @@ function Git_branch(){
set timeout 10
set timeout 10
spawn ssh root@
${
ip
}
spawn ssh root@
${
ip
}
expect
\"
]#
\"
expect
\"
]#
\"
send
\"
for x in
`
find /home/quant_group/
-maxdepth
2
-name
.git
`
;do cd
$(
dirname
$x
)
;echo
$(
dirname
$x
)
:;git branch | grep '*';done
\r\"
send
\"
sh /home/qa-deploy-utils/qa_shell_script/script_by_Contorller/find_branch.sh
\r\"
set timeout -1
set timeout -1
expect
\"
]#
\"
expect
\"
]#
\"
send
\"
exit
\r\"
send
\"
exit
\r\"
expect eof;"
expect eof;"
else
else
echo
"查看
服务
$2
的分支
$date
"
echo
"查看
$2
服务
的分支
$date
"
expect
-c
"
expect
-c
"
set timeout 10
set timeout 10
spawn ssh root@
${
ip
}
spawn ssh root@
${
ip
}
expect
\"
]#
\"
expect
\"
]#
\"
send
\"
cd /home/quant_group/
$2
\r\"
send
\"
cd /home/quant_group/
$2
\r\"
expect
\"
]#
\"
expect
\"
]#
\"
send
\"
git branch
\r\"
send
\"
git branch
| grep '*';git log -1 | grep Date;
\r\"
set timeout -1
set timeout -1
expect
\"
]#
\"
expect
\"
]#
\"
send
\"
exit
\r\"
send
\"
exit
\r\"
...
...
qa_shell_script/script_by_Contorller/find_branch.sh
0 → 100644
View file @
feca6ec4
for
x
in
`
find /home/quant_group/
-maxdepth
2
-name
.git
`
;
do
cd
$(
dirname
$x
)
;
echo
$(
dirname
$x
)
:
;
git branch |
grep
'*'
;
git log
-1
|
grep
Date
;
done
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