Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to centralized travis configuration #126

Merged
merged 1 commit into from
Mar 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions ci/Dockerfile.elasticsearch → .ci/Dockerfile.elasticsearch
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
ARG elastic_stack_version
FROM docker.elastic.co/elasticsearch/elasticsearch$distribution_suffix:$elastic_stack_version
ARG ELASTIC_STACK_VERSION
FROM docker.elastic.co/elasticsearch/elasticsearch$distribution_suffix:$ELASTIC_STACK_VERSION

ARG plugin_path=/usr/share/plugins/this
ARG plugin_path=/usr/share/plugins/plugin
ARG es_path=/usr/share/elasticsearch
ARG es_yml=$es_path/config/elasticsearch.yml

RUN rm -f $es_path/config/scripts

COPY --chown=elasticsearch:elasticsearch ci/elasticsearch-run.sh $es_path/
COPY --chown=elasticsearch:elasticsearch .ci/elasticsearch-run.sh $es_path/
24 changes: 24 additions & 0 deletions .ci/docker-compose.override.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: '3'

services:

logstash:
command: /usr/share/plugins/plugin/.ci/logstash-run.sh
environment:
- INTEGRATION=${INTEGRATION:-false}
- SECURE_INTEGRATION=${SECURE_INTEGRATION:-false}

elasticsearch:
build:
context: ../
dockerfile: .ci/Dockerfile.elasticsearch
args:
- ELASTIC_STACK_VERSION=$ELASTIC_STACK_VERSION
- INTEGRATION=${INTEGRATION:-false}
- SECURE_INTEGRATION=${SECURE_INTEGRATION:-false}
command: /usr/share/elasticsearch/elasticsearch-run.sh
tty: true
ports:
- "9200:9200"
user: elasticsearch

7 changes: 5 additions & 2 deletions ci/docker-run.sh → .ci/docker-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

# This is intended to be run inside the docker container as the command of the docker-compose.
set -ex

cd .ci

if [ "$INTEGRATION" == "true" ]; then
docker-compose -f ci/docker-compose.yml up --exit-code-from logstash
docker-compose up --exit-code-from logstash
else
docker-compose -f ci/docker-compose.yml up --exit-code-from logstash logstash
docker-compose up --exit-code-from logstash logstash
fi
12 changes: 7 additions & 5 deletions ci/docker-setup.sh → .ci/docker-setup.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

# This is intended to be run the plugin's root directory. `ci/docker-test.sh`
# This is intended to be run the plugin's root directory. `.ci/docker-setup.sh`
# Ensure you have Docker installed locally and set the ELASTIC_STACK_VERSION environment variable.
set -e

Expand Down Expand Up @@ -61,12 +61,14 @@ if [ "$ELASTIC_STACK_VERSION" ]; then
rm Gemfile.lock
fi

cd .ci

if [ "$INTEGRATION" == "true" ]; then
docker-compose -f ci/docker-compose.yml down
docker-compose -f ci/docker-compose.yml build
docker-compose down
docker-compose build
else
docker-compose -f ci/docker-compose.yml down
docker-compose -f ci/docker-compose.yml build logstash
docker-compose down
docker-compose build logstash
fi
else
echo "Please set the ELASTIC_STACK_VERSION environment variable"
Expand Down
File renamed without changes.
File renamed without changes.
12 changes: 3 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
---
sudo: required
services: docker
addons:
apt:
packages:
- docker-ce
import:
- logstash-plugins/.ci:travis/[email protected]

env:
- INTEGRATION=false ELASTIC_STACK_VERSION=5.x
- INTEGRATION=false ELASTIC_STACK_VERSION=6.x
Expand All @@ -14,5 +10,3 @@ env:
- INTEGRATION=true ELASTIC_STACK_VERSION=7.x SNAPSHOT=true
- INTEGRATION=true ELASTIC_STACK_VERSION=8.x SNAPSHOT=true
- INTEGRATION=true ELASTIC_STACK_VERSION=7.x
install: ci/docker-setup.sh
script: ci/docker-run.sh
20 changes: 0 additions & 20 deletions ci/Dockerfile.logstash

This file was deleted.

36 changes: 0 additions & 36 deletions ci/docker-compose.yml

This file was deleted.