diff --git a/testing/environments/docker/logstash/Dockerfile-snapshot b/testing/environments/docker/logstash/Dockerfile similarity index 77% rename from testing/environments/docker/logstash/Dockerfile-snapshot rename to testing/environments/docker/logstash/Dockerfile index 4def0562947..9eb9c6869af 100644 --- a/testing/environments/docker/logstash/Dockerfile-snapshot +++ b/testing/environments/docker/logstash/Dockerfile @@ -1,10 +1,10 @@ FROM java:8-jre -ENV LS_VERSION 5 +ARG LS_DOWNLOAD_URL +ARG LS_VERSION -ENV VERSION 6.0.0-alpha1-SNAPSHOT -ENV URL https://snapshots.elastic.co/downloads/logstash/logstash-${VERSION}.tar.gz -ENV PATH $PATH:/opt/logstash-$VERSION/bin +ENV URL ${LS_DOWNLOAD_URL}/logstash-${LS_VERSION}.tar.gz +ENV PATH $PATH:/opt/logstash-${LS_VERSION}/bin # Cache variable can be set during building to invalidate the build cache with `--build-arg CACHE=$(date +%s) .` ARG CACHE=1 diff --git a/testing/environments/docker/logstash/Dockerfile-5.0.0 b/testing/environments/docker/logstash/Dockerfile-5.0.0 deleted file mode 100644 index 1a4aedcdf31..00000000000 --- a/testing/environments/docker/logstash/Dockerfile-5.0.0 +++ /dev/null @@ -1,22 +0,0 @@ -FROM java:8-jre - -ENV VERSION 5.0.0 -ENV URL https://artifacts.elastic.co/downloads/logstash/logstash-${VERSION}.tar.gz -ENV PATH $PATH:/opt/logstash-$VERSION/bin - -# As all snapshot builds have the same url, the image is cached. The date at then can be used to invalidate the image -RUN set -x && \ - cd /opt && \ - wget -qO logstash.tar.gz $URL && \ - tar xzf logstash.tar.gz - -COPY logstash.conf.tmpl /logstash.conf.tmpl -COPY docker-entrypoint.sh /entrypoint.sh - -COPY pki /etc/pki - -ENTRYPOINT ["/entrypoint.sh"] - -EXPOSE 5044 5055 - -CMD logstash -f /logstash.conf --log.level=debug --config.debug diff --git a/testing/environments/docker/logstash/Dockerfile-latest b/testing/environments/docker/logstash/Dockerfile-latest deleted file mode 120000 index 26f8dde63a7..00000000000 --- a/testing/environments/docker/logstash/Dockerfile-latest +++ /dev/null @@ -1 +0,0 @@ -Dockerfile-5.0.0 \ No newline at end of file diff --git a/testing/environments/latest.yml b/testing/environments/latest.yml index 1fc1035faff..756cfec302c 100644 --- a/testing/environments/latest.yml +++ b/testing/environments/latest.yml @@ -4,7 +4,7 @@ version: '2' services: elasticsearch: - image: docker.elastic.co/elasticsearch/elasticsearch:latest + image: docker.elastic.co/elasticsearch/elasticsearch:5.1.1 environment: - "ES_JAVA_OPTS=-Xms512m -Xmx512m" - "network.host=" @@ -15,7 +15,10 @@ services: logstash: build: context: docker/logstash - dockerfile: Dockerfile-latest + dockerfile: Dockerfile + args: + LS_VERSION: 5.1.1 + LS_DOWNLOAD_URL: https://artifacts.elastic.co/downloads/logstash kibana: - image: docker.elastic.co/kibana/kibana:latest + image: docker.elastic.co/kibana/kibana:5.1.1 diff --git a/testing/environments/snapshot.yml b/testing/environments/snapshot.yml index 604a4ebac1c..7fb0c2ca86d 100644 --- a/testing/environments/snapshot.yml +++ b/testing/environments/snapshot.yml @@ -19,7 +19,11 @@ services: logstash: build: context: ./docker/logstash - dockerfile: Dockerfile-snapshot + dockerfile: Dockerfile + args: + LS_VERSION: 6.0.0-alpha1-SNAPSHOT + LS_DOWNLOAD_URL: https://snapshots.elastic.co/downloads/logstash + kibana: build: