test/ci/before_install.sh in searchkick-1.4.0 vs test/ci/before_install.sh in searchkick-1.4.1
- old
+ new
@@ -2,17 +2,16 @@
set -e
gem install bundler
-# https://docs.travis-ci.com/user/database-setup/#ElasticSearch
-sudo apt-get purge elasticsearch
if [[ $ELASTICSEARCH_VERSION == 1* ]]; then
- curl -O https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-$ELASTICSEARCH_VERSION.deb
+ curl -L -O https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-$ELASTICSEARCH_VERSION.tar.gz
elif [[ $ELASTICSEARCH_VERSION == 2* ]]; then
- curl -O https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/deb/elasticsearch/$ELASTICSEARCH_VERSION/elasticsearch-$ELASTICSEARCH_VERSION.deb
+ curl -L -O https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/$ELASTICSEARCH_VERSION/elasticsearch-$ELASTICSEARCH_VERSION.tar.gz
else
- curl -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-$ELASTICSEARCH_VERSION.deb
+ curl -L -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-$ELASTICSEARCH_VERSION.tar.gz
fi
-sudo dpkg -i --force-confnew elasticsearch-$ELASTICSEARCH_VERSION.deb
-sudo service elasticsearch restart
-sleep 10
+tar -xvf elasticsearch-$ELASTICSEARCH_VERSION.tar.gz
+cd elasticsearch-$ELASTICSEARCH_VERSION/bin
+./elasticsearch -d
+wget -O- --waitretry=1 --tries=30 --retry-connrefused -v http://127.0.0.1:9200/