Skip to content

Commit ddaafac

Browse files
committed
Replace elasticsearch install with docker
The Travis-CI implementation of running elasticsearch locally has been throwing null pointer exceptions during testing. Rather than installing a deb package that breaks, run ES inside of a docker container.
1 parent 1ca2d0d commit ddaafac

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

.travis.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,8 @@ before_install:
5252

5353
- sudo curl -O -L https://github.com/metacpan/metacpan-puppet/raw/master/modules/metacpan_elasticsearch/files/etc/scripts/score_version_numified.groovy > /tmp/es/score_version_numified.groovy
5454

55-
- sudo cp /tmp/es/* /etc/elasticsearch/scripts/
56-
57-
- sudo service elasticsearch stop && curl -O -L https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-2.4.3.deb && sudo dpkg -i --force-confnew elasticsearch-2.4.3.deb && sudo service elasticsearch start
58-
59-
- sudo service elasticsearch stop && curl -O -L https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-2.4.3.deb && sudo dpkg -i --force-confnew elasticsearch-2.4.3.deb && sudo service elasticsearch start
60-
- sudo service elasticsearch restart
55+
- docker pull elasticsearch:2.4-alpine
56+
- docker run -d -p 127.0.0.1:9200:9200 -v /tmp/es:/etc/elasticsearch/scripts elasticsearch:2.4-alpine
6157

6258
- cpanm -n Carton
6359
- cpanm -n App::cpm
@@ -83,7 +79,7 @@ after_success:
8379
# - cat ~/.cpanm/build.log
8480

8581
services:
86-
- elasticsearch
82+
- docker
8783

8884
# caching /local should save about 5 minutes in module install time
8985
cache:

0 commit comments

Comments
 (0)