diff --git a/.ci/docker-setup.sh b/.ci/docker-setup.sh deleted file mode 100755 index 6b6aa73..0000000 --- a/.ci/docker-setup.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash - -# 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 - -VERSION_URL="https://raw.githubusercontent.com/elastic/logstash/master/ci/logstash_releases.json" - - -pull_docker_snapshot() { - project="${1?project name required}" - local docker_image="docker.elastic.co/${project}/${project}:${ELASTIC_STACK_VERSION}" - echo "Pulling $docker_image" - docker pull "$docker_image" -} - -if [ "$ELASTIC_STACK_VERSION" ]; then - echo "Fetching versions from $VERSION_URL" - VERSIONS=$(curl --silent $VERSION_URL) - if [[ "$SNAPSHOT" = "true" ]]; then - ELASTIC_STACK_RETRIEVED_VERSION=$(echo $VERSIONS | jq '.snapshots."'"$ELASTIC_STACK_VERSION"'"') - echo $ELASTIC_STACK_RETRIEVED_VERSION - else - ELASTIC_STACK_RETRIEVED_VERSION=$(echo $VERSIONS | jq '.releases."'"$ELASTIC_STACK_VERSION"'"') - fi - if [[ "$ELASTIC_STACK_RETRIEVED_VERSION" != "null" ]]; then - # remove starting and trailing double quotes - ELASTIC_STACK_RETRIEVED_VERSION="${ELASTIC_STACK_RETRIEVED_VERSION%\"}" - ELASTIC_STACK_RETRIEVED_VERSION="${ELASTIC_STACK_RETRIEVED_VERSION#\"}" - echo "Translated $ELASTIC_STACK_VERSION to ${ELASTIC_STACK_RETRIEVED_VERSION}" - export ELASTIC_STACK_VERSION=$ELASTIC_STACK_RETRIEVED_VERSION - fi - - echo "Testing against version: $ELASTIC_STACK_VERSION" - - if [[ "$ELASTIC_STACK_VERSION" = *"-SNAPSHOT" ]]; then - pull_docker_snapshot "logstash" - if [ "$INTEGRATION" == "true" ]; then - pull_docker_snapshot "elasticsearch" - fi - fi - - if [ -f Gemfile.lock ]; then - rm Gemfile.lock - fi - - cd .ci - - if [ "$INTEGRATION" == "true" ]; then - docker-compose down - docker-compose build - else - docker-compose down - docker-compose build logstash - fi -else - echo "Please set the ELASTIC_STACK_VERSION environment variable" - echo "For example: export ELASTIC_STACK_VERSION=6.2.4" - exit 1 -fi diff --git a/.travis.yml b/.travis.yml index 0ed7bab..ee11240 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,13 +4,15 @@ import: before_install: - sudo sysctl -w vm.max_map_count=262144 # due ES bootstrap requirements -env: -- INTEGRATION=false ELASTIC_STACK_VERSION=7.x -- INTEGRATION=false ELASTIC_STACK_VERSION=8.x -- INTEGRATION=false ELASTIC_STACK_VERSION=7.x SNAPSHOT=true -- INTEGRATION=false ELASTIC_STACK_VERSION=8.x SNAPSHOT=true -- INTEGRATION=true ELASTIC_STACK_VERSION=7.x -- INTEGRATION=true ELASTIC_STACK_VERSION=7.x SNAPSHOT=true LOG_LEVEL=info -- INTEGRATION=true ELASTIC_STACK_VERSION=8.x SNAPSHOT=true LOG_LEVEL=info -- SECURE_INTEGRATION=true INTEGRATION=true ELASTIC_STACK_VERSION=7.x LOG_LEVEL=info -- SECURE_INTEGRATION=true INTEGRATION=true ELASTIC_STACK_VERSION=7.x ES_SSL_SUPPORTED_PROTOCOLS=TLSv1.3 +jobs: + include: + - stage: "Integration Tests" + - env: INTEGRATION=true SNAPSHOT=true LOG_LEVEL=info ELASTIC_STACK_VERSION=7.current + - env: INTEGRATION=true SNAPSHOT=true LOG_LEVEL=info ELASTIC_STACK_VERSION=8.previous + - env: INTEGRATION=true SNAPSHOT=true LOG_LEVEL=info ELASTIC_STACK_VERSION=8.current + - env: INTEGRATION=true SNAPSHOT=true LOG_LEVEL=info ELASTIC_STACK_VERSION=8.next + - env: INTEGRATION=true SNAPSHOT=true LOG_LEVEL=info ELASTIC_STACK_VERSION=8.future + - stage: "Secure Integration Tests" + - env: SECURE_INTEGRATION=true INTEGRATION=true LOG_LEVEL=info ELASTIC_STACK_VERSION=8.current SNAPSHOT=true + - env: SECURE_INTEGRATION=true INTEGRATION=true LOG_LEVEL=info ELASTIC_STACK_VERSION=7.current + - env: SECURE_INTEGRATION=true INTEGRATION=true LOG_LEVEL=info ELASTIC_STACK_VERSION=7.current ES_SSL_SUPPORTED_PROTOCOLS=TLSv1.3