Merge pull request #9295 from ClickHouse/blinkov-patch-15

Disable shared website testing environment in favour of personal ones
This commit is contained in:
Ivan Blinkov 2020-02-21 23:57:05 +03:00 committed by GitHub
commit afdb641f59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,8 +4,10 @@ set -ex
BASE_DIR=$(dirname $(readlink -f $0))
BUILD_DIR="${BASE_DIR}/../build"
PUBLISH_DIR="${BASE_DIR}/../publish"
GIT_TEST_URI="git@github.com:ClickHouse/clickhouse-test.github.io.git"
TEST_DOMAIN="${TEST_DOMAIN:-clickhouse.tech}"
GIT_TEST_URI="${GIT_TEST_URI:-git@github.com:ClickHouse/clickhouse.github.io.git}"
GIT_PROD_URI="git@github.com:ClickHouse/clickhouse.github.io.git"
EXTRA_BUILD_ARGS="${EXTRA_BUILD_ARGS:---enable-stable-releases}"
if [[ -z "$1" ]]
then
@ -17,7 +19,7 @@ DOCKER_HASH="$2"
if [[ -z "$1" ]]
then
source "${BASE_DIR}/venv/bin/activate"
python "${BASE_DIR}/build.py" "--enable-stable-releases"
python "${BASE_DIR}/build.py" ${EXTRA_BUILD_ARGS}
rm -rf "${PUBLISH_DIR}" || true
git clone "${GIT_TEST_URI}" "${PUBLISH_DIR}"
cd "${PUBLISH_DIR}"
@ -25,7 +27,7 @@ then
git config user.name "robot-clickhouse"
git rm -rf *
cp -R "${BUILD_DIR}"/* .
echo -n "test.clickhouse.tech" > CNAME
echo -n "${TEST_DOMAIN}" > CNAME
echo -n "" > README.md
echo -n "" > ".nojekyll"
cp "${BASE_DIR}/../../LICENSE" .
@ -35,22 +37,6 @@ then
git push origin master
cd "${BUILD_DIR}"
DOCKER_HASH=$(head -c 16 < /dev/urandom | xxd -p)
else
rm -rf "${BUILD_DIR}" || true
rm -rf "${PUBLISH_DIR}" || true
git clone "${GIT_TEST_URI}" "${BUILD_DIR}"
git clone "${GIT_PROD_URI}" "${PUBLISH_DIR}"
cd "${PUBLISH_DIR}"
git config user.email "robot-clickhouse@yandex-team.ru"
git config user.name "robot-clickhouse"
git rm -rf *
git commit -a -m "wipe old release"
rm -rf "${BUILD_DIR}/.git"
cp -R "${BUILD_DIR}"/* .
echo -n "clickhouse.tech" > CNAME
git add *
git commit -a -m "add new release at $(date)"
git push origin master
fi
QLOUD_ENDPOINT="https://platform.yandex-team.ru/api/v1"