File tree Expand file tree Collapse file tree 2 files changed +25
-15
lines changed Expand file tree Collapse file tree 2 files changed +25
-15
lines changed Original file line number Diff line number Diff line change @@ -45,20 +45,7 @@ before_install:
45
45
- git clone git://github.com/travis-perl/helpers ~/travis-perl-helpers
46
46
- source ~/travis-perl-helpers/init
47
47
48
- - sudo mkdir -p /etc/elasticsearch/scripts/ && sudo mkdir /tmp/es && sudo chmod 777 /tmp/es
49
-
50
- - sudo curl -O -L https://github.com/metacpan/metacpan-puppet/raw/master/modules/metacpan_elasticsearch/files/etc/scripts/prefer_shorter_module_names_100.groovy > /tmp/es/prefer_shorter_module_names_100.groovy
51
-
52
- - sudo curl -O -L https://github.com/metacpan/metacpan-puppet/raw/master/modules/metacpan_elasticsearch/files/etc/scripts/prefer_shorter_module_names_400.groovy > /tmp/es/prefer_shorter_module_names_400.groovy
53
-
54
- - sudo curl -O -L https://github.com/metacpan/metacpan-puppet/raw/master/modules/metacpan_elasticsearch/files/etc/scripts/status_is_latest.groovy > /tmp/es/status_is_latest.groovy
55
-
56
- - 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
57
-
58
- - sudo curl -O -L https://raw.githubusercontent.com/metacpan/metacpan-docker/master/elasticsearch/metacpan.yml > /tmp/metacpan.yml
59
-
60
- - docker pull elasticsearch:2.4-alpine
61
- - docker run -d -p 127.0.0.1:9200:9200 -v /tmp/metacpan.yml:/usr/share/elasticsearch/config/metacpan.yml -v /tmp/es:/usr/share/elasticsearch/config/scripts elasticsearch:2.4-alpine
48
+ - bin/docker-elasticsearch /tmp/metacpan.yml /tmp/es 127.0.0.1:9200
62
49
63
50
- cpanm -n Carton
64
51
- cpanm -n App::cpm
@@ -71,7 +58,7 @@ install:
71
58
- AUTHOR_TESTING=0 cpm install -L $PERL_CARTON_PATH --resolver $CPAN_RESOLVER --workers $(test-jobs) || (tail -n 500 -f ~/.perl-cpm/build.log; false)
72
59
73
60
before_script :
74
- - bin/wait-for-open http://localhost:9200 /
61
+ - bin/wait-for-open http://$ES_TEST /
75
62
- coverage-setup
76
63
77
64
script :
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ # bin/docker-elasticsearch /tmp/metacpan.yml /tmp/es 127.0.0.1:9200
4
+
5
+ ES_CONFIG_FILE=" $1 "
6
+ ES_CONFIG_DIR=" $2 "
7
+ ES_PORT=" $3 "
8
+
9
+ # sudo mkdir -p /etc/elasticsearch/scripts/ # believe unnecessary
10
+ sudo mkdir " $ES_CONFIG_DIR " && sudo chmod 777 " $ES_CONFIG_DIR "
11
+
12
+ sudo curl -O -L https://github.com/metacpan/metacpan-puppet/raw/master/modules/metacpan_elasticsearch/files/etc/scripts/prefer_shorter_module_names_100.groovy > " $ES_CONFIG_DIR " /prefer_shorter_module_names_100.groovy
13
+
14
+ sudo curl -O -L https://github.com/metacpan/metacpan-puppet/raw/master/modules/metacpan_elasticsearch/files/etc/scripts/prefer_shorter_module_names_400.groovy > " $ES_CONFIG_DIR " /prefer_shorter_module_names_400.groovy
15
+
16
+ sudo curl -O -L https://github.com/metacpan/metacpan-puppet/raw/master/modules/metacpan_elasticsearch/files/etc/scripts/status_is_latest.groovy > " $ES_CONFIG_DIR " /status_is_latest.groovy
17
+
18
+ sudo curl -O -L https://github.com/metacpan/metacpan-puppet/raw/master/modules/metacpan_elasticsearch/files/etc/scripts/score_version_numified.groovy > " $ES_CONFIG_DIR " /score_version_numified.groovy
19
+
20
+ sudo curl -O -L https://raw.githubusercontent.com/metacpan/metacpan-docker/master/elasticsearch/metacpan.yml > " $ES_CONFIG_FILE "
21
+
22
+ docker pull elasticsearch:2.4-alpine
23
+ docker run -d -p " $ES_PORT " :9200 -v " $ES_CONFIG_FILE " :/usr/share/elasticsearch/config/metacpan.yml -v " $ES_CONFIG_DIR " :/usr/share/elasticsearch/config/scripts elasticsearch:2.4-alpine
You can’t perform that action at this time.
0 commit comments