File tree Expand file tree Collapse file tree 3 files changed +25
-16
lines changed Expand file tree Collapse file tree 3 files changed +25
-16
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 " $ES_CONFIG_DIR " && sudo chmod 777 " $ES_CONFIG_DIR "
10
+
11
+ sudo curl -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
12
+
13
+ sudo curl -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
14
+
15
+ sudo curl -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
16
+
17
+ sudo curl -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
18
+
19
+ sudo curl -L https://raw.githubusercontent.com/metacpan/metacpan-docker/master/elasticsearch/metacpan.yml > " $ES_CONFIG_FILE "
20
+
21
+ docker pull elasticsearch:2.4-alpine
22
+ 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
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ BEGIN {
30
30
31
31
# Ensure we're starting fresh
32
32
my $tmp_dir = tmp_dir();
33
- $tmp_dir -> remove_tree;
33
+ $tmp_dir -> remove_tree( { safe => 0 } ) ;
34
34
$tmp_dir -> mkpath;
35
35
36
36
ok( $tmp_dir -> stat , " $tmp_dir exists for testing" );
You can’t perform that action at this time.
0 commit comments