File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 130130============================================================
131131"
132132}
133+
134+ wait_for_docker_image (){
135+ # This script will block until a docker image is ready
136+
137+ [[ -z " $1 " ]] && { echo " Please pass the docker image URI as the first parameter" ; exit 1; }
138+ oldopt=$-
139+ set +e
140+
141+ DOCKER_IMAGE=$1
142+ poll_count=0
143+ maximum_poll_count=150
144+
145+ # Wait for Feast Core to be available on GCR
146+ until docker pull " $DOCKER_IMAGE "
147+ do
148+ # Exit when we have tried enough times
149+ if [[ " $poll_count " -gt " $maximum_poll_count " ]]; then
150+ set -$oldopt
151+ exit 1
152+ fi
153+ # Sleep and increment counter on failure
154+ echo " ${DOCKER_IMAGE} could not be found" ;
155+ sleep 5;
156+ (( poll_count++ ))
157+ done
158+
159+ set -$oldopt
160+ }
Original file line number Diff line number Diff line change @@ -213,6 +213,13 @@ export HELM_COMMON_NAME=$HELM_COMMON_NAME
213213export IMAGE_TAG=$PULL_PULL_SHA
214214export SPECS_TOPIC=$SPECS_TOPIC
215215
216+ export PROJECT_ROOT_DIR=$( git rev-parse --show-toplevel)
217+ export SCRIPTS_DIR=${PROJECT_ROOT_DIR} /infra/scripts
218+ source ${SCRIPTS_DIR} /setup-common-functions.sh
219+
220+ wait_for_docker_image gcr.io/kf-feast/feast-core:" ${IMAGE_TAG} "
221+ wait_for_docker_image gcr.io/kf-feast/feast-serving:" ${IMAGE_TAG} "
222+
216223envsubst $' $TEMP_BUCKET $DATASET_NAME $GCLOUD_PROJECT $GCLOUD_NETWORK $SPECS_TOPIC \
217224 $GCLOUD_SUBNET $GCLOUD_REGION $IMAGE_TAG $HELM_COMMON_NAME $feast_kafka_1_ip
218225 $feast_kafka_2_ip $feast_kafka_3_ip $feast_redis_ip $feast_statsd_ip' < $ORIGINAL_DIR /infra/scripts/test-templates/values-end-to-end-batch-dataflow.yaml > $ORIGINAL_DIR /infra/charts/feast/values-end-to-end-batch-dataflow-updated.yaml
Original file line number Diff line number Diff line change @@ -24,6 +24,12 @@ clean_up() {
2424 exit $ARG
2525}
2626
27+ # Get Feast project repository root and scripts directory
28+ export PROJECT_ROOT_DIR=$( git rev-parse --show-toplevel)
29+ export SCRIPTS_DIR=${PROJECT_ROOT_DIR} /infra/scripts
30+ export COMPOSE_INTERACTIVE_NO_CLI=1
31+ source ${SCRIPTS_DIR} /setup-common-functions.sh
32+
2733if [ -z " $1 " ] ; then
2834 echo " No SHA provided as argument, using local HEAD" ;
2935 CURRENT_SHA=$( git rev-parse HEAD) ;
3440 export CURRENT_SHA
3541fi
3642
37- export PROJECT_ROOT_DIR=$( git rev-parse --show-toplevel)
38- export COMPOSE_INTERACTIVE_NO_CLI=1
39-
40- # Wait for docker images to be available
41- " ${PROJECT_ROOT_DIR} " /infra/scripts/wait-for-docker-images.sh " ${CURRENT_SHA} "
43+ wait_for_docker_image gcr.io/kf-feast/feast-core:" ${CURRENT_SHA} "
44+ wait_for_docker_image gcr.io/kf-feast/feast-serving:" ${CURRENT_SHA} "
4245
4346# Clean up Docker Compose if failure
4447trap clean_up EXIT
Load diff This file was deleted.
You can’t perform that action at this time.
0 commit comments