From 4538df2aa012a0092fe321bc9a862fcbdbacf455 Mon Sep 17 00:00:00 2001 From: Nick Lang Date: Wed, 31 Oct 2018 12:07:38 -0600 Subject: [PATCH] Testing changes for Jenkins CI (#863) * testing * more fixes * downgrade docker-compose file version cause jenkins * fixing matrix * back to elasticsearch_version * skip py3.7 for now there's a bug * add build badge and remove 3.3 Sphinx doesn't play nice with 3.3 * sphinx 1.7 drops support for python 3.3 * updating test matrix * remove travis * updating badges --- .ci/run-tests | 2 +- .ci/test-matrix.yml | 14 ++++++++++++-- .travis.yml | 34 ---------------------------------- Makefile | 6 +++--- README | 6 ++++-- docker-compose.yml | 6 +++--- setup.py | 2 +- 7 files changed, 24 insertions(+), 46 deletions(-) delete mode 100644 .travis.yml diff --git a/.ci/run-tests b/.ci/run-tests index b91a938f..309a9a87 100755 --- a/.ci/run-tests +++ b/.ci/run-tests @@ -11,4 +11,4 @@ # # TODO: implement the docker-based testing -cd .. && make run_tests +make run_tests diff --git a/.ci/test-matrix.yml b/.ci/test-matrix.yml index 9758aa5f..be5ec5f5 100644 --- a/.ci/test-matrix.yml +++ b/.ci/test-matrix.yml @@ -8,11 +8,21 @@ ELASTICSEARCH_VERSION: PYTHON_VERSION: -- 3 -- 2.7 - 2.6 +- 2.7 +- 3.3 +- 3.4 +- 3.5 +- 3.6 +- 3.7 exclude: # since a base image for python2.6 doens't exist i need to create one. - PYTHON_VERSION: 2.6 +# Something is wrong with the way 3.7 and the es-client handle multiprocessing. +# https://github.com/elastic/elasticsearch-py/issues/865 +- PYTHON_VERSION: 3.7 +# new feature in 6.4.2 which is causing a test failure. +# https://github.com/elastic/elasticsearch-py/issues/866 +- ELASTICSEARCH_VERSION: 6.4.2 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7c9a70af..00000000 --- a/.travis.yml +++ /dev/null @@ -1,34 +0,0 @@ -language: python - -python: - - "2.6" - - "2.7" - - "3.3" - - "3.4" - - "3.5" - - "3.6" - -addons: - apt: - packages: - - oracle-java8-installer - -env: - # different connection classes to test - - TEST_ES_CONNECTION=Urllib3HttpConnection - - TEST_ES_CONNECTION=RequestsHttpConnection - -before_install: - - sudo update-java-alternatives -s java-8-oracle - - export JAVA_HOME=/usr/lib/jvm/java-8-oracle/jre - - java -version - -install: - - curl -L -o /tmp/es-snap.zip https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.1.1.zip - - unzip /tmp/es-snap.zip -d /tmp/ - - /tmp/elasticsearch-*/bin/elasticsearch -E path.repo=/tmp -E repositories.url.allowed_urls='http://*' -E node.attr.testattr=test -d - - git clone https://github.com/elastic/elasticsearch.git ../elasticsearch - - pip install . - -script: - - python setup.py test diff --git a/Makefile b/Makefile index ef570c04..23717211 100644 --- a/Makefile +++ b/Makefile @@ -5,14 +5,14 @@ build: PYTHON_VERSION=${PYTHON_VERSION} docker-compose build client pull: - ELASTIC_VERSION=${ELASTIC_VERSION} PYTHON_VERSION=${PYTHON_VERSION} docker-compose pull + ELASTICSEARCH_VERSION=${ELASTICSEARCH_VERSION} PYTHON_VERSION=${PYTHON_VERSION} docker-compose pull push: # requires authentication. PYTHON_VERSION=${PYTHON_VERSION} docker-compose push client run_tests: - ELASTIC_VERSION=${ELASTIC_VERSION} PYTHON_VERSION=${PYTHON_VERSION} docker-compose run client python setup.py test + ELASTICSEARCH_VERSION=${ELASTICSEARCH_VERSION} PYTHON_VERSION=${PYTHON_VERSION} docker-compose run client python setup.py test start_elasticsearch: - ELASTIC_VERSION=${ELASTIC_VERSION} docker-compose up -d elasticsearch + ELASTICSEARCH_VERSION=${ELASTICSEARCH_VERSION} docker-compose up -d elasticsearch diff --git a/README b/README index 0e18f16c..251424b3 100644 --- a/README +++ b/README @@ -141,6 +141,8 @@ limitations under the License. Build status ------------ +.. image:: https://readthedocs.org/projects/elasticsearch-py/badge/?version=latest&style=flat + :target: https://elasticsearch-py.readthedocs.io/en/master/ -.. image:: https://secure.travis-ci.org/elastic/elasticsearch-py.png - :target: https://travis-ci.org/elastic/elasticsearch-py +.. image:: https://clients-ci.elastic.co/job/elastic+elasticsearch-py+master/badge/icon + :target: https://clients-ci.elastic.co/job/elastic+elasticsearch-py+master/ diff --git a/docker-compose.yml b/docker-compose.yml index bab080ec..1269da89 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,10 +1,10 @@ -version: '3.3' +version: '3.2' services: client: image: docker.elastic.co/clients/elasticsearch-py:${PYTHON_VERSION:-3} build: context: . - dockerfile: Dockerfile + dockerfile: ./Dockerfile args: PYTHON_VERSION: ${PYTHON_VERSION:-3} environment: @@ -18,7 +18,7 @@ services: - elasticsearch command: ["true"] # dummy command to override the command in the Dockerfile and do nothing. elasticsearch: - image: docker.elastic.co/elasticsearch/elasticsearch-oss:${ELASTIC_VERSION:-6.2.4} + image: docker.elastic.co/elasticsearch/elasticsearch-oss:${ELASTICSEARCH_VERSION:-6.2.4} volumes: - esvol:/tmp networks: diff --git a/setup.py b/setup.py index 4c708191..37d6fdc9 100644 --- a/setup.py +++ b/setup.py @@ -64,7 +64,7 @@ tests_require=tests_require, extras_require={ - 'develop': tests_require + ["sphinx", "sphinx_rtd_theme"], + 'develop': tests_require + ["sphinx<1.7", "sphinx_rtd_theme"], 'requests': ['requests>=2.4.0, <3.0.0'] }, )