Skip to content

Commit e5ff1da

Browse files
committed
Merge branch 'hotfix/0.13.1'
2 parents e144427 + 7df2db0 commit e5ff1da

File tree

9 files changed

+63
-6
lines changed

9 files changed

+63
-6
lines changed

1.4/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
NAME = pblittle/docker-logstash
2-
VERSION = 0.13.0
2+
VERSION = 0.13.1
33

44
# Set the LOGSTASH_CONFIG_URL env var to your logstash.conf file.
55
# We will use our basic config if the value is empty.

1.4/base/kibana.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ set -e -o pipefail
88

99
KIBANA_CONFIG_FILE="${LOGSTASH_SRC_DIR}/vendor/kibana/config.js"
1010

11+
readonly PROXY_PROTOCOL_REGEX='\(http[s]\?\)'
12+
1113
function es_proxy_host() {
1214
local host=${ES_PROXY_HOST:-'"+window.location.hostname+"'}
1315

@@ -31,7 +33,7 @@ function kibana_sanitize_config() {
3133
local port="$(es_proxy_port)"
3234
local protocol="$(es_proxy_protocol)"
3335

34-
sed -e "s|http|${protocol}|g" \
36+
sed -e "s|${PROXY_PROTOCOL_REGEX}|${protocol}|gI" \
3537
-e "s|\"+window.location.hostname+\"|${host}|g" \
3638
-e "s|9200|${port}|g" \
3739
-i "$KIBANA_CONFIG_FILE"

1.4/test/Makefile

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
NAME = pblittle/docker-logstash-test
2-
VERSION = 0.13.0
2+
VERSION = 0.13.1
33

44
BUILD_SRC = ${CURDIR}/../base
55

@@ -30,6 +30,15 @@ test-elasticsearch-linked: build
3030
fig build && \
3131
fig up
3232

33+
.PHONY: test-kibana-embedded
34+
test-kibana-embedded: build
35+
36+
cd ${CURDIR}/kibana-embedded && \
37+
fig stop && \
38+
fig rm && \
39+
fig build && \
40+
fig up
41+
3342
.PHONY: test-logstash-configtest
3443
test-logstash-configtest: build
3544

1.4/test/elasticsearch-embedded/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM pblittle/docker-logstash:0.13.0
1+
FROM pblittle/docker-logstash:0.13.1
22
MAINTAINER P. Barrett Little <barrett@barrettlittle.com> (@pblittle)
33

44
# Download packages required to run the test suite

1.4/test/elasticsearch-linked/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM pblittle/docker-logstash:0.13.0
1+
FROM pblittle/docker-logstash:0.13.1
22
MAINTAINER P. Barrett Little <barrett@barrettlittle.com> (@pblittle)
33

44
# Download packages required to run the test suite

1.4/test/kibana-embedded/Dockerfile

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
FROM pblittle/docker-logstash:0.13.1
2+
MAINTAINER P. Barrett Little <barrett@barrettlittle.com> (@pblittle)
3+
4+
# Download packages required to run the test suite
5+
#
6+
RUN apt-get update \
7+
&& apt-get install -yq \
8+
apt-utils \
9+
git \
10+
net-tools \
11+
--no-install-recommends \
12+
&& rm -rf /var/cache/apt/* \
13+
&& rm -rf /var/lib/apt/lists/*
14+
15+
# Download and install BATS test framework
16+
#
17+
RUN git clone https://github.com/sstephenson/bats.git /tmp/bats \
18+
&& /tmp/bats/install.sh /usr/local \
19+
&& rm -rf /tmp/bats
20+
21+
# $TERM needs to be set for bats
22+
#
23+
ENV TERM xterm-256color
24+
25+
WORKDIR /app
26+
ADD test.bats /app/test.bats
27+
28+
CMD [ '/usr/local/bin/bats', '/app/test.bats' ]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
logstash:
3+
build: .
4+
ports:
5+
- '9200:9200'
6+
- '9300:9300'
7+
- '9292:9292'
8+
environment:
9+
ES_PROXY_PROTOCOL: https
10+
LOGSTASH_TRACE: true

1.4/test/kibana-embedded/test.bats

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bats
2+
3+
@test "Kibana's elasticsearch server is 'https://"+window.location.hostname+":9200'" {
4+
run grep 'https://"+window.location.hostname+":9200' \
5+
/opt/logstash/vendor/kibana/config.js
6+
7+
[ "$status" -eq 0 ]
8+
}

1.4/test/logstash-configtest/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM pblittle/docker-logstash:0.13.0
1+
FROM pblittle/docker-logstash:0.13.1
22
MAINTAINER P. Barrett Little <barrett@barrettlittle.com> (@pblittle)
33

44
# Download packages required to run the test suite

0 commit comments

Comments
 (0)