22
33set -euo pipefail
44
5- function wait_for_images {
5+ function wait_for_image {
66 local DOCKER_REPOSITORY=$1
7- local GIT_TAG=$2
7+ local IMAGE_NAME=$2
8+ local GIT_TAG=$3
89 # Wait for images to be available in the docker repository; ci is the last image built
9- timeout 15m bash -c " while ! gcloud container images list-tags ${DOCKER_REPOSITORY} /feast-ci --format=json | jq -e \" .[] | select(.tags[] | contains (\\\" ${GIT_TAG} \\\" ))\" > /dev/null; do sleep 10s; done"
10+ echo " Waiting for ${DOCKER_REPOSITORY} /${IMAGE_NAME} :${GIT_TAG} to become available"
11+ timeout 15m bash -c " while ! gcloud container images list-tags ${DOCKER_REPOSITORY} /${IMAGE_NAME} --format=json | jq -e \" .[] | select(.tags[] | contains (\\\" ${GIT_TAG} \\\" ))\" > /dev/null; do sleep 10s; done"
1012}
1113
1214function k8s_cleanup {
@@ -42,8 +44,15 @@ function helm_install {
4244 # Args:
4345 # $RELEASE is helm release name
4446 # $DOCKER_REPOSITORY is the docker repo containing feast images tagged with $GIT_TAG
45- # ... you can pass additional args to this function that are passed on to helm install
4647 # $NAMESPACE is the namespace name
48+ # $GIT_TAG is the git tag to use when pulling the images. This can also be overridden
49+ # on per-image basis, that is, if these are set, they'll be used instead:
50+ # $JUPYTER_GIT_TAG
51+ # $SERVING_GIT_TAG
52+ # $CORE_GIT_TAG
53+ # $JOBSERVICE_GIT_TAG
54+ #
55+ # ... you can pass additional args to this function that are passed on to helm install
4756
4857 local RELEASE=$1
4958 local DOCKER_REPOSITORY=$2
@@ -59,13 +68,13 @@ function helm_install {
5968 if ! time helm install --wait " $RELEASE " " ${HELM_CHART_LOCATION:- ./ infra/ charts/ feast} " \
6069 --timeout 15m \
6170 --set " feast-jupyter.image.repository=${DOCKER_REPOSITORY} /feast-jupyter" \
62- --set " feast-jupyter.image.tag=${GIT_TAG} " \
71+ --set " feast-jupyter.image.tag=${JUPYTER_GIT_TAG :- $ GIT_TAG } " \
6372 --set " feast-online-serving.image.repository=${DOCKER_REPOSITORY} /feast-serving" \
64- --set " feast-online-serving.image.tag=${GIT_TAG} " \
73+ --set " feast-online-serving.image.tag=${SERVING_GIT_TAG :- $ GIT_TAG } " \
6574 --set " feast-jobservice.image.repository=${DOCKER_REPOSITORY} /feast-jobservice" \
66- --set " feast-jobservice.image.tag=${GIT_TAG} " \
75+ --set " feast-jobservice.image.tag=${JOBSERVICE_GIT_TAG :- $ GIT_TAG } " \
6776 --set " feast-core.image.repository=${DOCKER_REPOSITORY} /feast-core" \
68- --set " feast-core.image.tag=${GIT_TAG} " \
77+ --set " feast-core.image.tag=${CORE_GIT_TAG :- $ GIT_TAG } " \
6978 --set " prometheus-statsd-exporter.enabled=false" \
7079 --set " prometheus.enabled=false" \
7180 --set " grafana.enabled=false" \
0 commit comments