Toggle navigation
Toggle navigation
This project
Loading...
Sign in
yohoops
/
auto_deploy_test
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
5
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
huangping
8 years ago
Commit
4234659716f42ee825c310cce3ad5308d32ecb66
1 parent
58a4a9f7
Update deploy.sh
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletions
deploy.sh
deploy.sh
View file @
4234659
...
...
@@ -139,6 +139,7 @@ init(){
IPATBLE_HOME
=
$OPPS_DEPLOY_HOME
/scripts/iptable/
$SERVERS
AUTOCONFIG_HOME_BASE
=
$OPPS_DEPLOY_HOME
/autoconfig
IPATBLE_HOME_BASE
=
$OPPS_DEPLOY_HOME
/scripts/iptable
echo
"init ok"
}
...
...
@@ -166,6 +167,8 @@ package(){
git pull origin master
fi
echo
"package 1"
####update iptables
if
[
-d
"
$IPATBLE_HOME
"
]
;
then
echo
"[INFO] start to update ips..."
...
...
@@ -174,10 +177,14 @@ package(){
git pull origin master
fi
echo
"package 2"
## always remove old code
echo
" start to remove existed src folder:
$ROJECT_SOURCE_BRANCH_DIR
"
rm -rf
$ROJECT_SOURCE_BRANCH_DIR
echo
"package 3"
###update source code
if
[
! -d
"
$PROJECT_SOURCE_DIR
"
]
;
then
echo
"[INFO] git clone -b
$APP_BRANCH
$GIT_BASE_URL$GIT_GROUP
/
$APP_NAME
.git
$APP_BRANCH
"
...
...
@@ -205,6 +212,7 @@ package(){
git checkout tags/
$TAG_NAME
-b branch-
$TAG_NAME
fi
echo
"package 4"
cd
$ROJECT_SOURCE_BRANCH_DIR
/bin
###package app
...
...
@@ -212,8 +220,13 @@ package(){
if
[
! -d
$AUTOCONFIG_HOME
]
;
then
mkdir -p
$AUTOCONFIG_HOME
fi
echo
"package 5"
echo
"result cmd is sh
$ROJECT_SOURCE_BRANCH_DIR
/bin/mvn-package.sh
$AUTOCONFIG_HOME
/
${
APP_NAME
}
-autoconfig.properties
$AUTOCONFIG_HOME
/global-autoconfig.properties"
result
=
`
sh
$ROJECT_SOURCE_BRANCH_DIR
/bin/mvn-package.sh
$AUTOCONFIG_HOME
/
${
APP_NAME
}
-autoconfig.properties
$AUTOCONFIG_HOME
/global-autoconfig.properties
`
echo
"
$result
"
echo
"
result =
$result
"
if
[[
"
$result
"
=
~
"FAILURE"
]]
&&
[[
"
$result
"
=
~
"ERROR"
]]
;
then
PACKAGE_RESULT
=
"FAILED"
else
...
...
Please
register
or
login
to post a comment