Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,15 @@ objects:
wait_expiry_ts="$(($(date +%s) + 90))"
done

# wait until the image registry changes propogate to the apiserver to avoid
# unnecessary restarts
until oc get is -n openshift php 2>/dev/null; do
sleep 10
done
until [[ -n "$( oc get is -n openshift php --template '{{ .status.dockerImageRepository }}' 2>/dev/null )" ]]; do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you drop the earlier until oc get ... and just use this loop? If you need to eat an exit code, maybe:

until [[ -n "$( oc get is -n openshift php --template '{{ .status.dockerImageRepository }}' 2>/dev/null || true)" ]]; do

On the other hand, this code will hopefully not live long, so no need to spend lots of time polishing ;).

sleep 10
done

# set up cloud-provider-specific env vars
if [[ "${CLUSTER_TYPE}" == "gcp" ]]; then
export GOOGLE_APPLICATION_CREDENTIALS="/tmp/cluster/gce.json"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,15 @@ objects:
wait_expiry_ts="$(($(date +%s) + 90))"
done

# wait until the image registry changes propogate to the apiserver to avoid
# unnecessary restarts
until oc get is -n openshift php 2>/dev/null; do
sleep 10
done
until [[ -n "$( oc get is -n openshift php --template '{{ .status.dockerImageRepository }}' 2>/dev/null )" ]]; do
sleep 10
done

# set up cloud-provider-specific env vars
if [[ "${CLUSTER_TYPE}" == "gcp" ]]; then
export GOOGLE_APPLICATION_CREDENTIALS="/tmp/cluster/gce.json"
Expand Down