csantanapr closed pull request #181: configurable timeout for travis/build.sh URL: https://github.com/apache/incubator-openwhisk-deploy-kube/pull/181
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/tools/travis/build.sh b/tools/travis/build.sh index e59c8d8..28f1d89 100755 --- a/tools/travis/build.sh +++ b/tools/travis/build.sh @@ -11,7 +11,7 @@ couchdbHealthCheck () { PASSED=false TIMEOUT=0 - until [ $TIMEOUT -eq 60 ]; do + until [ $TIMEOUT -eq $TIMEOUT_STEP_LIMIT ]; do if [ -n "$(kubectl -n openwhisk logs $POD_NAME | grep "successfully setup and configured CouchDB")" ]; then PASSED=true break @@ -39,7 +39,7 @@ deploymentHealthCheck () { PASSED=false TIMEOUT=0 - until $PASSED || [ $TIMEOUT -eq 60 ]; do + until $PASSED || [ $TIMEOUT -eq $TIMEOUT_STEP_LIMIT ]; do KUBE_DEPLOY_STATUS=$(kubectl -n openwhisk get pods -l name="$1" -o wide | grep "$1" | awk '{print $3}') if [ "$KUBE_DEPLOY_STATUS" == "Running" ]; then PASSED=true @@ -70,7 +70,7 @@ statefulsetHealthCheck () { PASSED=false TIMEOUT=0 - until $PASSED || [ $TIMEOUT -eq 60 ]; do + until $PASSED || [ $TIMEOUT -eq $TIMEOUT_STEP_LIMIT ]; do KUBE_DEPLOY_STATUS=$(kubectl -n openwhisk get pods -l name="$1" -o wide | grep "$1"-0 | awk '{print $3}') if [ "$KUBE_DEPLOY_STATUS" == "Running" ]; then PASSED=true @@ -102,7 +102,7 @@ jobHealthCheck () { PASSED=false TIMEOUT=0 - until $PASSED || [ $TIMEOUT -eq 60 ]; do + until $PASSED || [ $TIMEOUT -eq $TIMEOUT_STEP_LIMIT ]; do KUBE_SUCCESSFUL_JOB=$(kubectl -n openwhisk get jobs -o wide | grep "$1" | awk '{print $3}') if [ "$KUBE_SUCCESSFUL_JOB" == "1" ]; then PASSED=true @@ -138,6 +138,9 @@ ROOTDIR="$SCRIPTDIR/../../" # Default to docker container factory if not specified OW_CONTAINER_FACTORY=${OW_CONTAINER_FACTORY:="docker"} +# Default timeout limit to 60 steps +TIMEOUT_STEP_LIMIT=${TIMEOUT_STEP_LIMIT:=60} + cd $ROOTDIR # Label invoker nodes (needed for DockerContainerFactory-based invoker deployment) ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services