...
|
...
|
@@ -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
|
...
|
...
|
|