delay flag in deploy.sh 25/94925/1
authorAkansha Dua <akansha.dua@amdocs.com>
Wed, 4 Sep 2019 12:17:15 +0000 (12:17 +0000)
committerAkansha Dua <akansha.dua@amdocs.com>
Wed, 4 Sep 2019 12:17:24 +0000 (12:17 +0000)
Issue-ID: OOM-1997

Signed-off-by: Akansha Dua <akansha.dua@amdocs.com>
Change-Id: I3a8b117c81219f75231bec6b61c99fe2dbcd0485

kubernetes/helm/plugins/deploy/deploy.sh

index 3416a02..1622689 100755 (executable)
@@ -109,6 +109,12 @@ deploy() {
     FLAGS="$(echo $FLAGS| sed -n 's/--verbose//p')"
     VERBOSE="true"
   fi
+  # determine if delay for deployment is enabled
+  DELAY="false"
+  if [[ $FLAGS = *"--delay"* ]]; then
+    FLAGS="$(echo $FLAGS| sed -n 's/--delay//p')"
+    DELAY="true"
+  fi   
   # determine if set-last-applied flag is enabled
   SET_LAST_APPLIED="false"
   if [[ $FLAGS = *"--set-last-applied"* ]]; then
@@ -238,6 +244,10 @@ deploy() {
              > $LOG_FILE.log 2>&1
         fi
       fi
+         if [[ $DELAY == "true" ]]; then
+               echo sleep 3m
+               sleep 3m
+         fi                                              
     else
       array=($(echo "$ALL_HELM_RELEASES" | grep "${RELEASE}-${subchart}"))
       n=${#array[*]}