Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CI script cassandra to retry download if it fails #783

Merged
merged 1 commit into from
Dec 6, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions .ci/setup_cassandra.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

CASSANDRA_BASE=apache-cassandra-$CASSANDRA_VERSION

sudo rm -rf /var/lib/cassandra/*
curl http://apache.arvixe.com/cassandra/$CASSANDRA_VERSION/$CASSANDRA_BASE-bin.tar.gz | tar xz
n=0
until [ $n -ge 5 ]
do
sudo rm -rf /var/lib/cassandra/*
curl http://apache.arvixe.com/cassandra/$CASSANDRA_VERSION/$CASSANDRA_BASE-bin.tar.gz | tar xz && break
n=$[$n+1]
sleep 5
done

if [[ ! -f $CASSANDRA_BASE/bin/cassandra ]] ; then
echo 'Failed downloading and unpacking cassandra. Aborting.'
exit 1
fi

sudo sh $CASSANDRA_BASE/bin/cassandra