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 9595 fi
9696fi
9797
98+ git archive --format=tar.gz ${GIT_SHA} > ${APP_NAME} .tar.gz
99+
98100# if minio is in the cluster, use it. otherwise use fetcher
101+ # TODO: figure out something for using S3 also
99102if [[ -n " $DEIS_MINIO_SERVICE_HOST " && -n " $DEIS_MINIO_SERVICE_PORT " ]]; then
100103 S3EP=${DEIS_MINIO_SERVICE_HOST} :${DEIS_MINIO_SERVICE_PORT}
101104elif [ -z " $S3EP " ]; then
@@ -109,6 +112,16 @@ sed -i -- "s#repo_name#$META_NAME#g" /etc/${SLUG_NAME}.yaml
109112sed -i -- " s#puturl#$PUSH_URL #g" /etc/${SLUG_NAME} .yaml
110113sed -i -- " s#tar-url#$TAR_URL #g" /etc/${SLUG_NAME} .yaml
111114
115+ ACCESS_KEY=` cat /var/run/secrets/object/store/access-key-id`
116+ ACCESS_SECRET=` cat /var/run/secrets/object/store/access-secret-key`
117+ mkdir -p /var/minio-conf
118+ CONFIG_DIR=/var/minio-conf
119+ echo " /bin/mc -C $CONFIG_DIR config host add " http://$S3EP " $ACCESS_KEY $ACCESS_SECRET "
120+ /bin/mc -C $CONFIG_DIR --quiet config host add " http://$S3EP " $ACCESS_KEY $ACCESS_SECRET
121+ /bin/mc -C $CONFIG_DIR --quiet mb " ${S3EP} /git"
122+ /bin/mc -C $CONFIG_DIR --quiet cp ${APP_NAME} .tar.gz $TAR_URL
123+ echo " stored tarfile in $TAR_URL "
124+
112125kubectl create -f /etc/${SLUG_NAME} .yaml
113126
114127# check for image creation or slug existence in S3EP
You can’t perform that action at this time.
0 commit comments