Skip to content

Commit

Permalink
Testing changes for Jenkins CI (opensearch-project#863)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
fxdgear authored Oct 31, 2018
1 parent c0d5f28 commit 4538df2
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 46 deletions.
2 changes: 1 addition & 1 deletion .ci/run-tests
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
#

# TODO: implement the docker-based testing
cd .. && make run_tests
make run_tests
14 changes: 12 additions & 2 deletions .ci/test-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 4 additions & 2 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -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/
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
},
)

0 comments on commit 4538df2

Please sign in to comment.