@@ -45,7 +45,7 @@ if [ -f $zk_dist/.build_finished ]; then
4545else
4646 rm -rf $zk_dist
4747 (cd $VTROOT /dist && \
48- wget http://archive. apache.org/dist/zookeeper/zookeeper-$zk_ver /zookeeper-$zk_ver .tar.gz && \
48+ wget http://apache.org/dist/zookeeper/zookeeper-$zk_ver /zookeeper-$zk_ver .tar.gz && \
4949 tar -xzf zookeeper-$zk_ver .tar.gz && \
5050 mkdir -p $zk_dist /lib && \
5151 cp zookeeper-$zk_ver /contrib/fatjar/zookeeper-$zk_ver -fatjar.jar $zk_dist /lib && \
5454 touch $zk_dist /.build_finished
5555fi
5656
57+ # Download and install etcd, link etcd binary into our root.
58+ etcd_version=v3.1.0-rc.1
59+ etcd_dist=$VTROOT /dist/etcd
60+ etcd_version_file=$etcd_dist /version
61+ if [[ -f $etcd_version_file && " $( cat $etcd_version_file ) " == " $etcd_version " ]]; then
62+ echo " skipping etcd install. remove $etcd_version_file to force re-install."
63+ else
64+ rm -rf $etcd_dist
65+ mkdir -p $etcd_dist
66+ download_url=https://github.com/coreos/etcd/releases/download
67+ (cd $etcd_dist && \
68+ wget ${download_url} /${etcd_version} /etcd-${etcd_version} -linux-amd64.tar.gz && \
69+ tar xzf etcd-${etcd_version} -linux-amd64.tar.gz)
70+ [ $? -eq 0 ] || fail " etcd download failed"
71+ echo " $etcd_version " > $etcd_version_file
72+ fi
73+ ln -snf $etcd_dist /etcd-${etcd_version} -linux-amd64/etcd $VTROOT /bin/etcd
74+
75+ # Download and install consul, link consul binary into our root.
76+ consul_version=0.7.2
77+ consul_dist=$VTROOT /dist/consul
78+ consul_version_file=$consul_dist /version
79+ if [[ -f $consul_version_file && " $( cat $consul_version_file ) " == " $consul_version " ]]; then
80+ echo " skipping consul install. remove $consul_version_file to force re-install."
81+ else
82+ rm -rf $consul_dist
83+ mkdir -p $consul_dist
84+ download_url=https://releases.hashicorp.com/consul
85+ (cd $consul_dist && \
86+ wget ${download_url} /${consul_version} /consul_${consul_version} _linux_amd64.zip && \
87+ unzip consul_${consul_version} _linux_amd64.zip)
88+ [ $? -eq 0 ] || fail " consul download failed"
89+ echo " $consul_version " > $consul_version_file
90+ fi
91+ ln -snf $consul_dist /consul $VTROOT /bin/consul
92+
5793# install gRPC C++ base, so we can install the python adapters.
5894# this also installs protobufs
5995grpc_dist=$VTROOT /dist/grpc
93129#
94130# DO NOT ADD LIBRARY DEPENDENCIES HERE. Instead use govendor as described below.
95131#
132+ # Note: We explicitly do not vendor the tools below because a) we want to stay
133+ # their latest version and b) it's easier to "go install" them this way.
96134gotools=" \
97135 github.com/golang/lint/golint \
98136 github.com/golang/mock/mockgen \
99137 github.com/kardianos/govendor \
100138 golang.org/x/tools/cmd/goimports \
101- honnef.co/go/unused/cmd/unused \
139+ golang.org/x/tools/cmd/goyacc \
140+ honnef.co/go/tools/cmd/unused \
102141"
103142
104- # Tools for uploading code coverage to coveralls.io (used by Travis CI).
105- gotools+=" github.com/modocache/gover github.com/mattn/goveralls"
106143# The cover tool needs to be installed into the Go toolchain, so it will fail
107144# if Go is installed somewhere that requires root access.
108145source tools/shell_functions.inc
@@ -135,6 +172,8 @@ ln -snf $VTTOP/data $VTROOT/data
135172ln -snf $VTTOP /py $VTROOT /py-vtdb
136173ln -snf $VTTOP /go/zk/zkctl/zksrv.sh $VTROOT /bin/zksrv.sh
137174ln -snf $VTTOP /test/vthook-test.sh $VTROOT /vthook/test.sh
175+ ln -snf $VTTOP /test/vthook-test_backup_error $VTROOT /vthook/test_backup_error
176+ ln -snf $VTTOP /test/vthook-test_backup_transform $VTROOT /vthook/test_backup_transform
138177
139178# find mysql and prepare to use libmysqlclient
140179if [ -z " $MYSQL_FLAVOR " ]; then
@@ -197,25 +236,29 @@ else
197236 cd $VTTOP /third_party/py && \
198237 tar -xzf mock-1.0.1.tar.gz && \
199238 cd mock-1.0.1 && \
200- python ./setup.py install --prefix=$mock_dist && \
239+ $PYTHON ./setup.py install --prefix=$mock_dist && \
201240 touch $mock_dist /.build_finished && \
202241 cd .. && \
203242 rm -r mock-1.0.1
204243fi
205244
206- # create pre-commit hooks
207- echo " creating git pre-commit hooks"
245+ # Create the Git hooks.
246+ echo " creating git hooks"
208247mkdir -p $VTTOP /.git/hooks
209248ln -sf $VTTOP /misc/git/pre-commit $VTTOP /.git/hooks/pre-commit
249+ ln -sf $VTTOP /misc/git/prepare-commit-msg.bugnumber $VTTOP /.git/hooks/prepare-commit-msg
250+ ln -sf $VTTOP /misc/git/commit-msg.bugnumber $VTTOP /.git/hooks/commit-msg
251+ (cd $VTTOP && git config core.hooksPath $VTTOP /.git/hooks)
210252
211253# Download chromedriver
212254echo " Installing selenium and chromedriver"
213255selenium_dist=$VTROOT /dist/selenium
214256mkdir -p $selenium_dist
215- virtualenv $selenium_dist
216- $selenium_dist /bin/pip install selenium
257+ $VIRTUALENV $selenium_dist
258+ PIP=$selenium_dist /bin/pip
259+ $PIP install selenium
217260mkdir -p $VTROOT /dist/chromedriver
218- curl -sL http://chromedriver.storage.googleapis.com/2.24 /chromedriver_linux64.zip > chromedriver_linux64.zip
261+ curl -sL http://chromedriver.storage.googleapis.com/2.25 /chromedriver_linux64.zip > chromedriver_linux64.zip
219262unzip -o -q chromedriver_linux64.zip -d $VTROOT /dist/chromedriver
220263rm chromedriver_linux64.zip
221264
0 commit comments