Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
Fixed retrying bug even if opening bridge is successful (#221)
Browse files Browse the repository at this point in the history
Signed-off-by: TannerGilbert <[email protected]>
  • Loading branch information
TannerGilbert authored Jan 2, 2022
1 parent 4c82a62 commit f1d3f7d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions quickstart/expose-keptn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ function wait_for_deployment_in_namespace() {
echo "Found deployment ${DEPLOYMENT} in namespace ${NAMESPACE}: ${DEPLOYMENT_LIST}"
break
else
RETRY=$((RETRY+1))
echo "Retry: ${RETRY}/${RETRY_MAX} - Unsufficient replicas for deployment - waiting 15s for deployment ${DEPLOYMENT} in namespace ${NAMESPACE}"
sleep 15
RETRY=$((RETRY+1))
echo "Retry: ${RETRY}/${RETRY_MAX} - Unsufficient replicas for deployment - waiting 15s for deployment ${DEPLOYMENT} in namespace ${NAMESPACE}"
sleep 15
fi
fi
done
Expand Down Expand Up @@ -122,10 +122,10 @@ do
if [ ${http_code} -eq 200 ]; then
echo "Attempting to open Keptn bridge on http://$INGRESS_IP.nip.io:$INGRESS_PORT/bridge"

if [[ "$OSTYPE" == "linux-gnu"* ]]; then
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
OPEN=('xdg-open')
else
OPEN=('open')
OPEN=('open')
fi

if ! command -v "${OPEN[@]}" &> /dev/null
Expand All @@ -135,6 +135,7 @@ do
break
else
"${OPEN[@]}" http://$INGRESS_IP.nip.io:$INGRESS_PORT/bridge
break
fi
fi
echo "Keptn bridge not yet available, waiting $SLEEP_TIME seconds and then trying again"
Expand Down

0 comments on commit f1d3f7d

Please sign in to comment.