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
This commit is contained in:
+1
-1
@@ -11,4 +11,4 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
# TODO: implement the docker-based testing
|
# TODO: implement the docker-based testing
|
||||||
cd .. && make run_tests
|
make run_tests
|
||||||
|
|||||||
+12
-2
@@ -8,11 +8,21 @@ ELASTICSEARCH_VERSION:
|
|||||||
|
|
||||||
|
|
||||||
PYTHON_VERSION:
|
PYTHON_VERSION:
|
||||||
- 3
|
|
||||||
- 2.7
|
|
||||||
- 2.6
|
- 2.6
|
||||||
|
- 2.7
|
||||||
|
- 3.3
|
||||||
|
- 3.4
|
||||||
|
- 3.5
|
||||||
|
- 3.6
|
||||||
|
- 3.7
|
||||||
|
|
||||||
exclude:
|
exclude:
|
||||||
# since a base image for python2.6 doens't exist i need to create one.
|
# since a base image for python2.6 doens't exist i need to create one.
|
||||||
- PYTHON_VERSION: 2.6
|
- 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
@@ -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
|
|
||||||
@@ -5,14 +5,14 @@ build:
|
|||||||
PYTHON_VERSION=${PYTHON_VERSION} docker-compose build client
|
PYTHON_VERSION=${PYTHON_VERSION} docker-compose build client
|
||||||
|
|
||||||
pull:
|
pull:
|
||||||
ELASTIC_VERSION=${ELASTIC_VERSION} PYTHON_VERSION=${PYTHON_VERSION} docker-compose pull
|
ELASTICSEARCH_VERSION=${ELASTICSEARCH_VERSION} PYTHON_VERSION=${PYTHON_VERSION} docker-compose pull
|
||||||
|
|
||||||
push:
|
push:
|
||||||
# requires authentication.
|
# requires authentication.
|
||||||
PYTHON_VERSION=${PYTHON_VERSION} docker-compose push client
|
PYTHON_VERSION=${PYTHON_VERSION} docker-compose push client
|
||||||
|
|
||||||
run_tests:
|
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:
|
start_elasticsearch:
|
||||||
ELASTIC_VERSION=${ELASTIC_VERSION} docker-compose up -d elasticsearch
|
ELASTICSEARCH_VERSION=${ELASTICSEARCH_VERSION} docker-compose up -d elasticsearch
|
||||||
|
|||||||
@@ -141,6 +141,8 @@ limitations under the License.
|
|||||||
|
|
||||||
Build status
|
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
|
.. image:: https://clients-ci.elastic.co/job/elastic+elasticsearch-py+master/badge/icon
|
||||||
:target: https://travis-ci.org/elastic/elasticsearch-py
|
:target: https://clients-ci.elastic.co/job/elastic+elasticsearch-py+master/
|
||||||
|
|||||||
+3
-3
@@ -1,10 +1,10 @@
|
|||||||
version: '3.3'
|
version: '3.2'
|
||||||
services:
|
services:
|
||||||
client:
|
client:
|
||||||
image: docker.elastic.co/clients/elasticsearch-py:${PYTHON_VERSION:-3}
|
image: docker.elastic.co/clients/elasticsearch-py:${PYTHON_VERSION:-3}
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: ./Dockerfile
|
||||||
args:
|
args:
|
||||||
PYTHON_VERSION: ${PYTHON_VERSION:-3}
|
PYTHON_VERSION: ${PYTHON_VERSION:-3}
|
||||||
environment:
|
environment:
|
||||||
@@ -18,7 +18,7 @@ services:
|
|||||||
- elasticsearch
|
- elasticsearch
|
||||||
command: ["true"] # dummy command to override the command in the Dockerfile and do nothing.
|
command: ["true"] # dummy command to override the command in the Dockerfile and do nothing.
|
||||||
elasticsearch:
|
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:
|
volumes:
|
||||||
- esvol:/tmp
|
- esvol:/tmp
|
||||||
networks:
|
networks:
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ setup(
|
|||||||
tests_require=tests_require,
|
tests_require=tests_require,
|
||||||
|
|
||||||
extras_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']
|
'requests': ['requests>=2.4.0, <3.0.0']
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user