Authored by huangping

Update deploy.sh

Showing 1 changed file with 14 additions and 1 deletions
@@ -139,6 +139,7 @@ init(){ @@ -139,6 +139,7 @@ init(){
139 IPATBLE_HOME=$OPPS_DEPLOY_HOME/scripts/iptable/$SERVERS 139 IPATBLE_HOME=$OPPS_DEPLOY_HOME/scripts/iptable/$SERVERS
140 AUTOCONFIG_HOME_BASE=$OPPS_DEPLOY_HOME/autoconfig 140 AUTOCONFIG_HOME_BASE=$OPPS_DEPLOY_HOME/autoconfig
141 IPATBLE_HOME_BASE=$OPPS_DEPLOY_HOME/scripts/iptable 141 IPATBLE_HOME_BASE=$OPPS_DEPLOY_HOME/scripts/iptable
  142 + echo "init ok"
142 } 143 }
143 144
144 145
@@ -166,6 +167,8 @@ package(){ @@ -166,6 +167,8 @@ package(){
166 git pull origin master 167 git pull origin master
167 fi 168 fi
168 169
  170 + echo "package 1"
  171 +
169 ####update iptables 172 ####update iptables
170 if [ -d "$IPATBLE_HOME" ]; then 173 if [ -d "$IPATBLE_HOME" ]; then
171 echo "[INFO] start to update ips..." 174 echo "[INFO] start to update ips..."
@@ -174,10 +177,14 @@ package(){ @@ -174,10 +177,14 @@ package(){
174 git pull origin master 177 git pull origin master
175 fi 178 fi
176 179
  180 + echo "package 2"
  181 +
177 ## always remove old code 182 ## always remove old code
178 echo " start to remove existed src folder: $ROJECT_SOURCE_BRANCH_DIR " 183 echo " start to remove existed src folder: $ROJECT_SOURCE_BRANCH_DIR "
179 rm -rf $ROJECT_SOURCE_BRANCH_DIR 184 rm -rf $ROJECT_SOURCE_BRANCH_DIR
180 185
  186 + echo "package 3"
  187 +
181 ###update source code 188 ###update source code
182 if [ ! -d "$PROJECT_SOURCE_DIR" ]; then 189 if [ ! -d "$PROJECT_SOURCE_DIR" ]; then
183 echo "[INFO] git clone -b $APP_BRANCH $GIT_BASE_URL$GIT_GROUP/$APP_NAME.git $APP_BRANCH" 190 echo "[INFO] git clone -b $APP_BRANCH $GIT_BASE_URL$GIT_GROUP/$APP_NAME.git $APP_BRANCH"
@@ -205,6 +212,7 @@ package(){ @@ -205,6 +212,7 @@ package(){
205 git checkout tags/$TAG_NAME -b branch-$TAG_NAME 212 git checkout tags/$TAG_NAME -b branch-$TAG_NAME
206 fi 213 fi
207 214
  215 + echo "package 4"
208 216
209 cd $ROJECT_SOURCE_BRANCH_DIR/bin 217 cd $ROJECT_SOURCE_BRANCH_DIR/bin
210 ###package app 218 ###package app
@@ -212,8 +220,13 @@ package(){ @@ -212,8 +220,13 @@ package(){
212 if [ ! -d $AUTOCONFIG_HOME ]; then 220 if [ ! -d $AUTOCONFIG_HOME ]; then
213 mkdir -p $AUTOCONFIG_HOME 221 mkdir -p $AUTOCONFIG_HOME
214 fi 222 fi
  223 +
  224 + echo "package 5"
  225 +
  226 + echo "result cmd is sh $ROJECT_SOURCE_BRANCH_DIR/bin/mvn-package.sh $AUTOCONFIG_HOME/${APP_NAME}-autoconfig.properties $AUTOCONFIG_HOME/global-autoconfig.properties"
  227 +
215 result=`sh $ROJECT_SOURCE_BRANCH_DIR/bin/mvn-package.sh $AUTOCONFIG_HOME/${APP_NAME}-autoconfig.properties $AUTOCONFIG_HOME/global-autoconfig.properties` 228 result=`sh $ROJECT_SOURCE_BRANCH_DIR/bin/mvn-package.sh $AUTOCONFIG_HOME/${APP_NAME}-autoconfig.properties $AUTOCONFIG_HOME/global-autoconfig.properties`
216 - echo "$result" 229 + echo "result = $result"
217 if [[ "$result" =~ "FAILURE" ]] && [[ "$result" =~ "ERROR" ]];then 230 if [[ "$result" =~ "FAILURE" ]] && [[ "$result" =~ "ERROR" ]];then
218 PACKAGE_RESULT="FAILED" 231 PACKAGE_RESULT="FAILED"
219 else 232 else