mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Less docker/qloud in release.sh
This commit is contained in:
parent
5dc6483807
commit
bcb1ff68bb
@ -4,7 +4,6 @@ set -ex
|
||||
BASE_DIR=$(dirname $(readlink -f $0))
|
||||
BUILD_DIR="${BASE_DIR}/../build"
|
||||
PUBLISH_DIR="${BASE_DIR}/../publish"
|
||||
IMAGE="clickhouse/website"
|
||||
GIT_TEST_URI="git@github.com:ClickHouse/clickhouse-test.github.io.git"
|
||||
GIT_PROD_URI="git@github.com:ClickHouse/clickhouse.github.io.git"
|
||||
|
||||
@ -14,8 +13,6 @@ then
|
||||
else
|
||||
TAG="$1"
|
||||
fi
|
||||
FULL_NAME="${IMAGE}:${TAG}"
|
||||
REMOTE_NAME="registry.yandex.net/${FULL_NAME}"
|
||||
DOCKER_HASH="$2"
|
||||
if [[ -z "$1" ]]
|
||||
then
|
||||
@ -37,10 +34,7 @@ then
|
||||
git commit -a -m "add new release at $(date)"
|
||||
git push origin master
|
||||
cd "${BUILD_DIR}"
|
||||
docker build -t "${FULL_NAME}" "${BUILD_DIR}"
|
||||
docker tag "${FULL_NAME}" "${REMOTE_NAME}"
|
||||
DOCKER_HASH=$(docker push "${REMOTE_NAME}" | tail -1 | awk '{print $3;}')
|
||||
docker rmi "${FULL_NAME}"
|
||||
DOCKER_HASH=$(head -c 16 < /dev/urandom | xxd -p)
|
||||
else
|
||||
rm -rf "${BUILD_DIR}" || true
|
||||
rm -rf "${PUBLISH_DIR}" || true
|
||||
@ -67,8 +61,4 @@ then
|
||||
else
|
||||
QLOUD_ENV="${QLOUD_PROJECT}.prod"
|
||||
fi
|
||||
QLOUD_COMPONENT="${QLOUD_ENV}.nginx"
|
||||
QLOUD_VERSION=$(curl -v -H "Authorization: OAuth ${QLOUD_TOKEN}" "${QLOUD_ENDPOINT}/environment/status/${QLOUD_ENV}" | python -c "import json; import sys; print json.loads(sys.stdin.read()).get('version')")
|
||||
curl -v -H "Authorization: OAuth ${QLOUD_TOKEN}" -H "Content-Type: application/json" --data "{\"repository\": \"${REMOTE_NAME}\", \"hash\": \"${DOCKER_HASH}\"}" "${QLOUD_ENDPOINT}/component/${QLOUD_COMPONENT}/${QLOUD_VERSION}/deploy" > /dev/null
|
||||
|
||||
echo ">>> Successfully deployed ${TAG} ${DOCKER_HASH} to ${QLOUD_ENV} <<<"
|
||||
|
Loading…
Reference in New Issue
Block a user