Skip to content

Commit

Permalink
Merge pull request openshift#9079 from miminar/wait-until-registry-is…
Browse files Browse the repository at this point in the history
…-ready

Merged by openshift-bot
  • Loading branch information
OpenShift Bot committed Jun 1, 2016
2 parents 5af4c07 + 7302258 commit 7afe72b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hack/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,9 @@ function install_registry {
}

function wait_for_registry {
wait_for_command '[[ "$(oc get endpoints docker-registry --output-version=v1 --template="{{ if .subsets }}{{ len .subsets }}{{ else }}0{{ end }}" --config=${ADMIN_KUBECONFIG} || echo "0")" != "0" ]]' $((5*TIME_MIN))
wait_for_command "oc get endpoints docker-registry --template='{{ len .subsets }}' --config='${ADMIN_KUBECONFIG}' | grep -q '[1-9][0-9]*'" $((5*TIME_MIN))
local readyjs='{.items[*].status.conditions[?(@.type=="Ready")].status}'
wait_for_command "oc get pod -l deploymentconfig=docker-registry -o jsonpath='$readyjs' --config='${ADMIN_KUBECONFIG}' | grep -qi true" $TIME_MIN
}


Expand Down

0 comments on commit 7afe72b

Please sign in to comment.