@@ -129,33 +129,35 @@ ACCESS_SECRET=`cat /var/run/secrets/object/store/access-secret-key`
129129mkdir -p /var/minio-conf
130130CONFIG_DIR=/var/minio-conf
131131MC_PREFIX=" mc -C $CONFIG_DIR --quiet"
132- $MC_PREFIX config host add " $HTTP_PREFIX ://$S3EP " $ACCESS_KEY $ACCESS_SECRET
133- $MC_PREFIX mb " $HTTP_PREFIX ://${S3EP} /git"
134- $MC_PREFIX cp ${APP_NAME} .tar.gz $TAR_URL
135- puts-step " stored tarfile in $TAR_URL "
132+ $MC_PREFIX config host add " $HTTP_PREFIX ://$S3EP " $ACCESS_KEY $ACCESS_SECRET & > /dev/null
133+ $MC_PREFIX mb " $HTTP_PREFIX ://${S3EP} /git" & > /dev/null
134+ $MC_PREFIX cp ${APP_NAME} .tar.gz $TAR_URL & > /dev/null
136135
137- puts-step " creating builder pod in namespace $POD_NAMESPACE "
138- kubectl --namespace=$POD_NAMESPACE create -f /etc/${SLUG_NAME} .yaml
136+ kubectl --namespace=${POD_NAMESPACE} create -f /etc/${SLUG_NAME} .yaml > /dev/null
137+
138+ # wait for pod to be running and then pull its logs
139+ until [ " ` kubectl --namespace=${POD_NAMESPACE} get pods -o yaml ${META_NAME} | grep " phase: " | awk {' print $2' }` " == " Running" ]; do
140+ sleep 0.1
141+ done
142+ kubectl --namespace=${POD_NAMESPACE} logs -f ${META_NAME} 2> /dev/null &
139143
140144# check for image creation or slug existence in S3EP
141145
142146if [[ " $REMOTE_STORAGE " == " 1" ]]; then
143147 LS_CMD=" $MC_PREFIX ls $PUSH_URL "
144- echo " Waiting for build to complete..."
145148 until $LS_CMD & > /dev/null; do
146149 echo -ne " ."
147150 sleep 2
148151 done
149152else
150- echo -ne " Waiting for build to complete..."
151153 while [ ! -f /apps/${SLUG_NAME} /slug.tgz ]
152154 do
153155 echo -ne " ."
154156 sleep 2
155157 done
156158fi
157- echo " "
158- echo " Build complete. "
159+
160+ # build completed
159161
160162URL=" http://$DEIS_WORKFLOW_SERVICE_HOST :$DEIS_WORKFLOW_SERVICE_PORT /v2/hooks/config"
161163RESPONSE=$( get-app-config -url=" $URL " -key=" {{ getv " /deis/controller/builderKey" }}" -user=$USER -app=$APP_NAME )
0 commit comments