sudo: required
language: go
go:
  - 1.7
  - 1.8
  - tip
matrix:
  allow_failures:
    - go: tip
services:
  - docker
before_script:
  # - mkdir ${HOME}/elasticsearch
  # - wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ES_VERSION}.tar.gz
  # - tar -xzvf elasticsearch-${ES_VERSION}.tar.gz -C ${HOME}/elasticsearch
  # - ls -alFR ${HOME}/elasticsearch
  # - cp -r config/* ${HOME}/elasticsearch/elasticsearch-${ES_VERSION}/config/
  # - cat ${HOME}/elasticsearch/elasticsearch-${ES_VERSION}/config/elasticsearch.yml
  # - ${HOME}/elasticsearch/elasticsearch-${ES_VERSION}/bin/elasticsearch >& /dev/null &
  - mkdir -p /tmp/elasticsearch/config
  - cp -r config/* /tmp/elasticsearch/config/
  - sudo sysctl -w vm.max_map_count=262144
  - docker run --rm --privileged=true -p 9200:9200 -p 9300:9300 -v "/tmp/elasticsearch/config:/usr/share/elasticsearch/config" -e ES_JAVA_OPTS='-Xms1g -Xmx1g' elasticsearch:5.2.2 elasticsearch >& /dev/null &
  - sleep 15

sudo: required
language: go
go:
  - 1.7
  - 1.8
  - tip
matrix:
  allow_failures:
    - go: tip
services:
  - docker
before_script:
  - mkdir -p /tmp/elasticsearch/config
  - cp -r config/* /tmp/elasticsearch/config/
  - sudo sysctl -w vm.max_map_count=262144
  - docker run --rm --privileged=true -p 9200:9200 -p 9300:9300 -v "/tmp/elasticsearch/config:/usr/share/elasticsearch/config" -e ES_JAVA_OPTS='-Xms1g -Xmx1g' elasticsearch:5.3.0 elasticsearch >& /dev/null &
  - sleep 15

Use Elasticsearch 5.3.0 on Travis
Use Elasticsearch 5.3.0 on Travis
