File tree Expand file tree Collapse file tree
rootfs/etc/confd/templates Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9898git archive --format=tar.gz ${GIT_SHA} > ${APP_NAME} .tar.gz
9999
100100HTTP_PREFIX=" http"
101+ REMOTE_STORAGE=" 0"
101102# if minio is in the cluster, use it. otherwise use fetcher
102103# TODO: figure out something for using S3 also
103104if [[ -n " $DEIS_MINIO_SERVICE_HOST " && -n " $DEIS_MINIO_SERVICE_PORT " ]]; then
104105 S3EP=${DEIS_MINIO_SERVICE_HOST} :${DEIS_MINIO_SERVICE_PORT}
106+ REMOTE_STORAGE=" 1"
105107elif [[ -n " $DEIS_OUTSIDE_STORAGE_HOST " && -n " $DEIS_OUTSIDE_STORAGE_PORT " ]]; then
106108 HTTP_PREFIX=" https"
107109 S3EP=${DEIS_OUTSIDE_STORAGE_HOST} :${DEIS_OUTSIDE_STORAGE_PORT}
110+ REMOTE_STORAGE=" 1"
108111elif [ -z " $S3EP " ]; then
109112 S3EP=${HOST} :3000
110113fi
@@ -136,11 +139,23 @@ kubectl --namespace=$POD_NAMESPACE create -f /etc/${SLUG_NAME}.yaml
136139
137140# check for image creation or slug existence in S3EP
138141
139- while [ ! -f /apps/${SLUG_NAME} /slug.tgz ]
140- do
141- sleep 2
142- echo " no file"
143- done
142+ if [[ " $REMOTE_STORAGE " == " 1" ]]; then
143+ LS_CMD=" $MC_PREFIX ls $PUSH_URL "
144+ echo " Waiting for build to complete..."
145+ until $LS_CMD & > /dev/null; do
146+ echo -ne " ."
147+ sleep 2
148+ done
149+ else
150+ echo -ne " Waiting for build to complete..."
151+ while [ ! -f /apps/${SLUG_NAME} /slug.tgz ]
152+ do
153+ echo -ne " ."
154+ sleep 2
155+ done
156+ fi
157+ echo " "
158+ echo " Build complete."
144159
145160URL=" http://$DEIS_WORKFLOW_SERVICE_HOST :$DEIS_WORKFLOW_SERVICE_PORT /v2/hooks/config"
146161RESPONSE=$( get-app-config -url=" $URL " -key=" {{ getv " /deis/controller/builderKey" }}" -user=$USER -app=$APP_NAME )
You can’t perform that action at this time.
0 commit comments