forked from elasticsearch-dump/elasticsearch-dump
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
38 lines (31 loc) · 1.12 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
sudo: true
language: node_js
node_js:
- "4"
- "6"
branches:
only:
- master
addons:
apt:
packages:
- oracle-java8-installer
- oracle-java8-set-default
# We'll manually install versions of ES ourselves
# services:
# - elasticsearch
script: npm run test
env:
matrix:
- "ES_VERSION=2.3.4 ES_DOWNLOAD_URL=https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/deb/elasticsearch/2.3.4/elasticsearch-2.3.4.deb"
- "ES_VERSION=5.0.2 ES_DOWNLOAD_URL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.0.2.deb"
before_install:
## ES has different download locations for each version, so we'll download them both and then just use the one we want
- curl $ES_DOWNLOAD_URL > elasticsearch_package.deb
## Now, use the ENV to choose the version
- sudo dpkg -i --force-confnew elasticsearch_package.deb
- sudo service elasticsearch restart
# ES needs some time to start
- sleep 15
- curl http://localhost:9200
# - curl -XPUT 'http://localhost:9200/_all/_settings?preserve_existing=true' -d '{"index.number_of_replicas" : "0","index.number_of_shards" : "1"}'