Merge "Use baidu cloud disk to host local repo for china" into dev/experimental

This commit is contained in:
Jenkins 2014-11-06 00:48:58 +00:00 committed by Gerrit Code Review
commit 00dd364d8f
2 changed files with 8 additions and 1 deletions

View File

@ -22,7 +22,11 @@ sudo cp -rf $WEB_HOME/v2 /var/www/compass_web/
if [[ $LOCAL_REPO = "y" ]]; then
echo "setting up local repo"
mkdir -p /tmp/repo
download https://s3-us-west-1.amazonaws.com/compass-local-repo/local_repo.tar.gz local_repo.tar.gz unzip /tmp/repo || exit $?
if [[ "$REGION" == "asia" ]]; then
download $LOCAL_REPO_ASIA local_repo.tar.gz unzip /tmp/repo || exit $?
else
download https://s3-us-west-1.amazonaws.com/compass-local-repo/local_repo.tar.gz local_repo.tar.gz unzip /tmp/repo || exit $?
fi
mv -f /tmp/repo/local_repo/* /var/www/compass_web/v2/
if [[ "$?" != "0" ]]; then
echo "failed to setup local repo"

View File

@ -83,3 +83,6 @@ export ADAPTERS_SOURCE=${ADAPTERS_SOURCE:-}
export SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
export COMPASSDIR=${SCRIPT_DIR}/..
export TESTMODE=${TESTMODE:-"False"}
# Set Local Repo source for Asia
export LOCAL_REPO_ASIA=${LOCAL_REPO_ASIA:-"http://nj.baidupcs.com/file/5aa212b98c6315fd8c22706c56819aad?bkt=p2-nj-424&fid=2147902224-250528-851286049844289&time=1415230560&sign=FDTAXERB-DCb740ccc5511e5e8fedcff06b081203-Q0KR%2FCMM5y%2B3ha0fXamUW32EywA%3D&to=nb&fm=Nan,B,U,ny&newver=1&newfm=1&flow_ver=3&expires=8h&rt=pr&r=451353717&mlogid=587914427&vuk=2147902224&vbdid=441655319&fin=local_repo.tar.gz"}