test/ci/before_install.sh in searchkick-1.3.6 vs test/ci/before_install.sh in searchkick-1.4.0
- old
+ new
@@ -1,21 +1,18 @@
#!/usr/bin/env bash
+set -e
+
gem install bundler
+# https://docs.travis-ci.com/user/database-setup/#ElasticSearch
sudo apt-get purge elasticsearch
if [[ $ELASTICSEARCH_VERSION == 1* ]]; then
- wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-$ELASTICSEARCH_VERSION.deb
+ curl -O https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-$ELASTICSEARCH_VERSION.deb
+elif [[ $ELASTICSEARCH_VERSION == 2* ]]; then
+ curl -O https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/deb/elasticsearch/$ELASTICSEARCH_VERSION/elasticsearch-$ELASTICSEARCH_VERSION.deb
else
- wget https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/deb/elasticsearch/$ELASTICSEARCH_VERSION/elasticsearch-$ELASTICSEARCH_VERSION.deb
+ curl -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-$ELASTICSEARCH_VERSION.deb
fi
-sudo dpkg -i elasticsearch-$ELASTICSEARCH_VERSION.deb
-sudo service elasticsearch start
-
-if [ -n "$NOBRAINER" ]; then
- source /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
- wget -qO- http://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -
- sudo apt-get update -q
- sudo apt-get install rethinkdb
- sudo cp /etc/rethinkdb/default.conf.sample /etc/rethinkdb/instances.d/instance1.conf
- sudo service rethinkdb restart
-fi
+sudo dpkg -i --force-confnew elasticsearch-$ELASTICSEARCH_VERSION.deb
+sudo service elasticsearch restart
+sleep 10