Skip to content
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
4 changes: 2 additions & 2 deletions .ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG RUBY_TEST_VERSION=2.5
ARG RUBY_TEST_VERSION=2.6.1
FROM ruby:${RUBY_TEST_VERSION}

ARG TEST_SUITE=unit
ARG TEST_SUITE=client
ENV TEST_SUITE=${TEST_SUITE}


Expand Down
14 changes: 7 additions & 7 deletions .ci/docker-compose.yml → .ci/docker-compose/client.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
version: '3.2'
services:
client:
image: docker.elastic.co/clients/elasticsearch-ruby:${RUBY_TEST_VERSION:-7.0.0-alpha2}
image: docker.elastic.co/clients/elasticsearch-ruby:${RUBY_TEST_VERSION:-2.6.1}
build:
context: ..
context: ../../
dockerfile: .ci/Dockerfile
args:
RUBY_TEST_VERSION: ${RUBY_TEST_VERSION:-2.6.1}
ELASTICSEARCH_VERSION: ${ELASTICSEARCH_VERSION:-6.5.0}
TEST_SUITE: ${TEST_SUITE:-unit}
ELASTICSEARCH_VERSION: ${ELASTICSEARCH_VERSION:-7.0.0-alpha2}
TEST_SUITE: ${TEST_SUITE:-client}
environment:
- "TEST_ES_SERVER=http://elasticsearch:9200"
volumes:
Expand All @@ -26,8 +26,8 @@ services:
- "repositories.url.allowed_urls=http://*"
- node.attr.testattr=test
- bootstrap.memory_lock=false
- "discovery.zen.minimum_master_nodes=2"
- "discovery.zen.ping.unicast.hosts=elasticsearch"
- "discovery.type=single-node"
#- "discovery.zen.ping.unicast.hosts=elasticsearch"
ulimits:
memlock:
soft: -1
Expand All @@ -39,7 +39,7 @@ services:
networks:
- esnet
deploy:
replicas: 2
replicas: 1
networks:
esnet:
volumes:
Expand Down
46 changes: 46 additions & 0 deletions .ci/docker-compose/rest_api.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
version: '3.2'
services:
client:
image: docker.elastic.co/clients/elasticsearch-ruby:${RUBY_TEST_VERSION:-2.6.1}
build:
context: ../../
dockerfile: .ci/Dockerfile
args:
RUBY_TEST_VERSION: ${RUBY_TEST_VERSION:-2.6.1}
ELASTICSEARCH_VERSION: ${ELASTICSEARCH_VERSION:-7.0.0-alpha2}
TEST_SUITE: ${TEST_SUITE:-client}
environment:
- "TEST_ES_SERVER=http://elasticsearch:9200"
volumes:
- esvol:/tmp
networks:
- esnet
depends_on:
- elasticsearch
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:${ELASTICSEARCH_VERSION:-7.0.0-alpha2}
environment:
- cluster.name=docker-cluster
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- path.repo=/tmp
- "repositories.url.allowed_urls=http://*"
- node.attr.testattr=test
- bootstrap.memory_lock=false
- "discovery.type=single-node"
#- "discovery.zen.ping.unicast.hosts=elasticsearch"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- esvol:/tmp
ports:
- 9200
networks:
- esnet
deploy:
replicas: 1
networks:
esnet:
volumes:
esvol:
6 changes: 3 additions & 3 deletions .ci/run-tests
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ export TEST_SUITE=${TEST_SUITE}

function clean_docker_compose() {
# clean up the docker-compose environment
docker-compose -f .ci/docker-compose.yml down --volumes --remove-orphans
docker-compose -f .ci/docker-compose/${TEST_SUITE}.yml down --volumes --remove-orphans
}

# build the client to ensure the proper version variables are used
docker-compose -f .ci/docker-compose.yml --compatibility build client
docker-compose -f .ci/docker-compose/${TEST_SUITE}.yml --compatibility build client
build_exit_code=$?
if [[ $build_exit_code != 0 ]]; then
echo "The client container failed to build."
clean_docker_compose
exit $build_exit_code
fi

docker-compose -f .ci/docker-compose.yml --compatibility run client
docker-compose -f .ci/docker-compose/${TEST_SUITE}.yml --compatibility run client
test_exit_code=$?

clean_docker_compose
Expand Down
4 changes: 2 additions & 2 deletions .ci/test-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUBY_TEST_VERSION:
- 2.4.5

TEST_SUITE:
- unit
- integration
- rest_api
- client

exclude: ~
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ branches:
- 2.x
- travis

env:
global:
- TEST_ES_SERVER=http://localhost:9250

matrix:
include:

Expand All @@ -39,7 +43,7 @@ matrix:
# Integration tests
- rvm: 2.6.1
jdk: oraclejdk8
env: QUIET=y ELASTICSEARCH_HOSTS=localhost:9250,localhost:9251 TEST_SUITE=integration
env: QUIET=y TEST_SUITE=integration

allow_failures:
- rvm: ruby-head
Expand Down
Loading