From 6b4de868c7e3b86ac04349aa431fd11a03571156 Mon Sep 17 00:00:00 2001 From: Thomas Brognoli Date: Wed, 30 Jan 2019 17:57:01 +0100 Subject: [PATCH 01/26] Add integration tests --- luqum/tests/book.json | 182 +++++++++++++++++++++++++++++ luqum/tests/test_es_integration.py | 168 ++++++++++++++++++++++++++ requirements-dev.txt | 5 +- 3 files changed, 353 insertions(+), 2 deletions(-) create mode 100644 luqum/tests/book.json create mode 100644 luqum/tests/test_es_integration.py diff --git a/luqum/tests/book.json b/luqum/tests/book.json new file mode 100644 index 0000000..afe689c --- /dev/null +++ b/luqum/tests/book.json @@ -0,0 +1,182 @@ +{ + "books": [ + { + "title": "Harry Potter and the Philosopher's Stone", + "edition": "Bloomsbury", + "author": { + "name": "J. K. Rowling", + "birthdate": "1965-07-31" + }, + "illustrators": [ + { + "name": "Thomas Taylor", + "nationality": "UK", + "birthdate": "1973-05-22" + }, + { + "name": "Mary GrandPré", + "nationality":"US", + "birthdate": "1954-02-13" + } + ], + "publication_date": "1997-06-26", + "n_pages": "223" + }, + { + "title": "Harry Potter and the Chamber of Secrets", + "edition": "Bloomsbury", + "author": { + "name": "J. K. Rowling", + "birthdate": "1965-07-31" + }, + "illustrators": [ + { + "name": "Cliff Wright", + "nationality": "UK", + "birthdate": "1953-10-24" + }, + { + "name": "Mary GrandPré", + "nationality": "US", + "birthdate": "1954-02-13" + } + ], + "publication_date": "1998-07-02", + "n_pages": "251" + }, + { + "title": "Harry Potter and the Prisoner of Azkaban", + "edition": "Bloomsbury", + "author": { + "name": "J. K. Rowling", + "birthdate": "1965-07-31" + }, + "illustrators": [ + { + "name": "Cliff Wright", + "nationality": "UK", + "birthdate": "1953-10-24" + }, + { + "name": "Mary GrandPré", + "nationality": "US", + "birthdate": "1954-02-13" + } + ], + "publication_date": "1999-07-08", + "n_pages": "317" + }, + { + "title": "Harry Potter and the Goblet of Fire", + "edition": "Bloomsbury", + "author": { + "name": "J. K. Rowling", + "birthdate": "1965-07-31" + }, + "illustrators": [ + { + "name": "Giles Greenfield", + "nationality": "UK" + }, + { + "name": "Mary GrandPré", + "nationality": "US", + "birthdate": "1954-02-13" + } + ], + "publication_date": "2000-07-08", + "n_pages": "636" + }, + { + "title": "Harry Potter and the Order of the Phoenix", + "edition": "Bloomsbury", + "author": { + "name": "J. K. Rowling", + "birthdate": "1965-07-31" + }, + "illustrators": [ + { + "name":"Jason Cockcroft", + "nationality":"UK" + }, + { + "name": "Mary GrandPré", + "nationality": "US", + "birthdate": "1954-02-13" + } + ], + "publication_date": "2003-06-21", + "n_pages": "766" + }, + { + "title": "Harry Potter and the Half-Blood Prince", + "edition": "Bloomsbury", + "author": { + "name": "J. K. Rowling", + "birthdate": "1965-07-31" + }, + "illustrators": [ + { + "name": "Jason Cockcroft", + "nationality": "UK" + }, + { + "name": "Mary GrandPré", + "nationality": "US", + "birthdate": "1954-02-13" + } + ], + "publication_date": "2005-07-16", + "n_pages": "607" + }, + { + "title": "Harry Potter and the Deathly Hallows", + "edition": "Bloomsbury", + "author": { + "name": "J. K. Rowling", + "birthdate": "1965-07-31" + }, + "illustrators": [ + { + "name": "Jason Cockcroft", + "nationality": "UK" + }, + { + "name": "Mary GrandPré", + "nationality": "US", + "birthdate": "1954-02-13" + } + ], + "publication_date": "2007-07-21", + "n_pages": "607" + }, + { + "title": "Harry Potter and the Cursed Child", + "edition": "Little, Brown and Company", + "author": { + "name": "J. K. Rowling", + "birthdate": "1965-07-31" + }, + "illustrators": [], + "publication_date": "2016-07-30", + "n_pages": "360" + }, + { + "title": "The Tales of Beedle the Bard", + "edition": "Lumos (charity)", + "author": { + "name": "J. K. Rowling", + "birthdate": "1965-07-31" + }, + "illustrators": [ + { + "name":"J. K. Rowling", + "nationality": "UK", + "birthdate": "1965-07-31" + } + ], + "publication_date": "2008-12-04", + "n_pages": "157" + } + ] +} diff --git a/luqum/tests/test_es_integration.py b/luqum/tests/test_es_integration.py new file mode 100644 index 0000000..7abe583 --- /dev/null +++ b/luqum/tests/test_es_integration.py @@ -0,0 +1,168 @@ +import json +from unittest import TestCase + +import elasticsearch_dsl +from elasticsearch import Elasticsearch +from elasticsearch.helpers import bulk +from elasticsearch_dsl import Date, Index, Integer, Nested, Object, Search +from elasticsearch_dsl.connections import connections +from luqum.elasticsearch import ElasticsearchQueryBuilder, SchemaAnalyzer +from luqum.parser import parser + +client = Elasticsearch() + +co = connections.create_connection(hosts=["localhost"], timeout=20) +if elasticsearch_dsl.VERSION[0] == 6: + from elasticsearch_dsl import Text, Document, InnerDoc + + ES6 = True +else: + from elasticsearch_dsl import ( + String as Text, + DocType as Document, + InnerObjectWrapper as InnerDoc, + ) + + ES6 = False + + +class Illustrator(InnerDoc): + name = Text() + birthdate = Date() + nationality = Text() + + +class Book(Document): + title = Text() + edition = Text() + author = Object(properties={"name": Text(), "birthdate": Date()}) + publication_date = Date() + n_pages = Integer() + + if ES6: + illustrators = Nested(Illustrator) + + class Index: + name = "bk" + + else: + illustrators = Nested( + Object( + properties={"name": Text(), "birthdate": Date(), "nationality": Text()} + ) + ) + + class Meta: + index = "bk" + + def save(self, **kwargs): + return super().save(**kwargs) + + +def add_data(): + search = connections.get_connection() + Book.init() + with open("luqum/tests/book.json") as f: + datas = json.load(f) + + actions = ( + {"_op_type": "index", "_id": i, "_source": d} + for i, d in enumerate(datas["books"]) + ) + if ES6: + doc_type = "doc" + else: + doc_type = "book" + + bulk(search, actions, index="bk", doc_type=doc_type, refresh=True) + + +class LuqumRequestTestCase(TestCase): + @classmethod + def setUpClass(cls): + cls.search = Search(using=client, index="bk") + MESSAGES_SCHEMA = {"mappings": Book._doc_type.mapping.to_dict()} + schema_analizer = SchemaAnalyzer(MESSAGES_SCHEMA) + cls.es_builder = ElasticsearchQueryBuilder( + **schema_analizer.query_builder_options() + ) + add_data() + + def _ask_luqum(self, req): + tree = parser.parse(req) + query = self.es_builder(tree) + return [x.title for x in self.search.filter(query).execute()] + + def test_simple_field_search(self): + self.assertListEqual( + self._ask_luqum('title:"Chamber"'), + ["Harry Potter and the Chamber of Secrets"], + ) + + def test_nested_field_search(self): + self.assertListEqual( + self._ask_luqum("illustrators:(name:Giles)"), + ["Harry Potter and the Goblet of Fire"], + ) + + def test_or_condition_search(self): + self.assertListEqual( + self._ask_luqum( + 'illustrators:(name:"Giles Greenfield" OR name:"Cliff Wright")' + ), + [ + "Harry Potter and the Prisoner of Azkaban", + "Harry Potter and the Chamber of Secrets", + "Harry Potter and the Goblet of Fire", + ], + ) + + def test_and_condition_search(self): + self.assertListEqual( + self._ask_luqum( + 'illustrators:(name:"Cliff Wright") AND illustrators:(name:"Mary GrandPré")' + ), + [ + "Harry Potter and the Prisoner of Azkaban", + "Harry Potter and the Chamber of Secrets", + ], + ) + + def test_date_search(self): + self.assertListEqual( + self._ask_luqum("publication_date:[2005-01-01 TO 2010-12-31]"), + [ + "Harry Potter and the Half-Blood Prince", + "The Tales of Beedle the Bard", + "Harry Potter and the Deathly Hallows", + ], + ) + + def test_int_search(self): + self.assertListEqual( + self._ask_luqum("n_pages:[500 TO *]"), + [ + "Harry Potter and the Half-Blood Prince", + "Harry Potter and the Order of the Phoenix", + "Harry Potter and the Deathly Hallows", + "Harry Potter and the Goblet of Fire", + ], + ) + + def test_proximity_search(self): + self.assertListEqual( + self._ask_luqum('title:"Harry Secrets"~5'), + ["Harry Potter and the Chamber of Secrets"], + ) + + def test_fuzzy_search(self): + self.assertListEqual( + self._ask_luqum("title:Gublet~2"), ["Harry Potter and the Goblet of Fire"] + ) + + @classmethod + def tearDownClass(cls): + if ES6: + Book._index.delete() + else: + Index("bk").delete(ignore=404) diff --git a/requirements-dev.txt b/requirements-dev.txt index 0f49049..17df8af 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,6 +1,7 @@ -r requirements.txt -nose==1.3.7 coverage==4.0.3 -Sphinx==1.4.1 +elasticsearch-dsl==6.3.1 flake8==2.5.4 +nose==1.3.7 +Sphinx==1.4.1 From fdc3b0ce9c658e162d2f9910eb5bfb3e004645b5 Mon Sep 17 00:00:00 2001 From: Thomas Brognoli Date: Thu, 14 Feb 2019 14:46:32 +0100 Subject: [PATCH 02/26] Add tests --- luqum/tests/test_es_integration.py | 57 ++++++++++++++++++++++++++---- 1 file changed, 51 insertions(+), 6 deletions(-) diff --git a/luqum/tests/test_es_integration.py b/luqum/tests/test_es_integration.py index 7abe583..557b157 100644 --- a/luqum/tests/test_es_integration.py +++ b/luqum/tests/test_es_integration.py @@ -29,7 +29,7 @@ class Illustrator(InnerDoc): name = Text() birthdate = Date() - nationality = Text() + nationality = Text(index="not_analyzed") class Book(Document): @@ -47,9 +47,11 @@ class Index: else: illustrators = Nested( - Object( - properties={"name": Text(), "birthdate": Date(), "nationality": Text()} - ) + properties={ + "name": Text(), + "birthdate": Date(), + "nationality": Text(index="not_analyzed"), + } ) class Meta: @@ -128,7 +130,7 @@ def test_and_condition_search(self): ], ) - def test_date_search(self): + def test_date_range_search(self): self.assertListEqual( self._ask_luqum("publication_date:[2005-01-01 TO 2010-12-31]"), [ @@ -138,7 +140,7 @@ def test_date_search(self): ], ) - def test_int_search(self): + def test_int_range_search(self): self.assertListEqual( self._ask_luqum("n_pages:[500 TO *]"), [ @@ -149,6 +151,11 @@ def test_int_search(self): ], ) + def test_int_search(self): + self.assertListEqual( + self._ask_luqum("n_pages:360"), ["Harry Potter and the Cursed Child"] + ) + def test_proximity_search(self): self.assertListEqual( self._ask_luqum('title:"Harry Secrets"~5'), @@ -160,6 +167,44 @@ def test_fuzzy_search(self): self._ask_luqum("title:Gublet~2"), ["Harry Potter and the Goblet of Fire"] ) + def test_object_field_search(self): + self.assertListEqual( + self._ask_luqum('illustrators:(name:"J. K. Rowling")'), + ["The Tales of Beedle the Bard"], + ) + + def test_fail_search(self): + self.assertListEqual(self._ask_luqum("title:secret"), []) + + def test_wildcard_matching(self): + self.assertListEqual( + self._ask_luqum("title:secret*"), + ["Harry Potter and the Chamber of Secrets"], + ) + + def test_wildcard1_search(self): + self.assertListEqual( + self._ask_luqum("title:P*ix"), ["Harry Potter and the Order of the Phoenix"] + ) + + def test_not_search(self): + self.assertListEqual( + self._ask_luqum("-title:Harry"), ["The Tales of Beedle the Bard"] + ) + + def test_not_analysed_field_search(self): + self.assertListEqual(self._ask_luqum("illustrators:nationality:uk"), []) + + def test_complex_search(self): + + self.assertListEqual( + self._ask_luqum( + "illustrators:name:Grand* AND illustrators:(-name:grandpr* AND (name:J*on OR birthdate:[1950-01-01 TO 1970-01-01])) AND title:phoenux~2" + ), + ['Harry Potter and the Order of the Phoenix'], + ) + + @classmethod def tearDownClass(cls): if ES6: From ecff0b8f6b95c07e5442b0123b10c76bea253f19 Mon Sep 17 00:00:00 2001 From: Thomas Brognoli Date: Thu, 14 Feb 2019 14:47:08 +0100 Subject: [PATCH 03/26] try travis with one ES version --- .travis.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.travis.yml b/.travis.yml index 9764a41..25519f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,12 +10,21 @@ matrix: - python: 3.7 dist: xenial sudo: true + +before_install: + - wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - + - echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list + - sudo apt-get update && sudo apt-get install elasticsearch -y + - sudo service elasticsearch start + install: - pip install . - pip install -r requirements-dev.txt - pip install coveralls + script: - make tests - make quality + after_success: - coveralls From aaf2400f93f831b2e70352132ede2abef37cc806 Mon Sep 17 00:00:00 2001 From: Thomas Brognoli Date: Thu, 14 Feb 2019 15:01:57 +0100 Subject: [PATCH 04/26] use ES2 --- .travis.yml | 2 +- requirements-dev.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 25519f1..991d7ec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ matrix: before_install: - wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - - - echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list + - echo "deb https://packages.elastic.co/elasticsearch/2.x/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elastic.list - sudo apt-get update && sudo apt-get install elasticsearch -y - sudo service elasticsearch start diff --git a/requirements-dev.txt b/requirements-dev.txt index 17df8af..8808651 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,7 +1,7 @@ -r requirements.txt coverage==4.0.3 -elasticsearch-dsl==6.3.1 +elasticsearch-dsl==2.2.0 flake8==2.5.4 nose==1.3.7 Sphinx==1.4.1 From 9de17214ffdff4deef5df21fa202fb8e62c7fa16 Mon Sep 17 00:00:00 2001 From: Thomas Brognoli Date: Thu, 14 Feb 2019 15:11:02 +0100 Subject: [PATCH 05/26] pep8 --- luqum/tests/test_es_integration.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/luqum/tests/test_es_integration.py b/luqum/tests/test_es_integration.py index 557b157..90e54e1 100644 --- a/luqum/tests/test_es_integration.py +++ b/luqum/tests/test_es_integration.py @@ -199,12 +199,19 @@ def test_complex_search(self): self.assertListEqual( self._ask_luqum( - "illustrators:name:Grand* AND illustrators:(-name:grandpr* AND (name:J*on OR birthdate:[1950-01-01 TO 1970-01-01])) AND title:phoenux~2" + """ + title:phoenux~2 AND + illustrators:name:Grand* AND + illustrators:( + -name:grandpr* AND ( + name:J*on OR birthdate:[1950-01-01 TO 1970-01-01] + ) + ) + """ ), - ['Harry Potter and the Order of the Phoenix'], + ["Harry Potter and the Order of the Phoenix"], ) - @classmethod def tearDownClass(cls): if ES6: From 69781166bc24d5c4def19f1fb365e85288c13d45 Mon Sep 17 00:00:00 2001 From: Thomas Brognoli Date: Fri, 15 Feb 2019 09:58:20 +0100 Subject: [PATCH 06/26] add non analysed field --- luqum/tests/test_es_integration.py | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/luqum/tests/test_es_integration.py b/luqum/tests/test_es_integration.py index 90e54e1..9f8f2f1 100644 --- a/luqum/tests/test_es_integration.py +++ b/luqum/tests/test_es_integration.py @@ -9,12 +9,13 @@ from luqum.elasticsearch import ElasticsearchQueryBuilder, SchemaAnalyzer from luqum.parser import parser -client = Elasticsearch() +MAJOR_ES = elasticsearch_dsl.VERSION[0] +if MAJOR_ES > 2: + from elasticsearch_dsl import Keyword -co = connections.create_connection(hosts=["localhost"], timeout=20) -if elasticsearch_dsl.VERSION[0] == 6: +ES6 = False +if MAJOR_ES == 6: from elasticsearch_dsl import Text, Document, InnerDoc - ES6 = True else: from elasticsearch_dsl import ( @@ -23,13 +24,14 @@ InnerObjectWrapper as InnerDoc, ) - ES6 = False - +client = Elasticsearch() +co = connections.create_connection(hosts=["localhost"], timeout=20) -class Illustrator(InnerDoc): - name = Text() - birthdate = Date() - nationality = Text(index="not_analyzed") +if MAJOR_ES > 2: + class Illustrator(InnerDoc): + name = Text() + birthdate = Date() + nationality = Keyword() class Book(Document): @@ -50,7 +52,7 @@ class Index: properties={ "name": Text(), "birthdate": Date(), - "nationality": Text(index="not_analyzed"), + "nationality": Keyword() if MAJOR_ES > 2 else Text(index="not_analyzed") } ) @@ -86,7 +88,7 @@ def setUpClass(cls): MESSAGES_SCHEMA = {"mappings": Book._doc_type.mapping.to_dict()} schema_analizer = SchemaAnalyzer(MESSAGES_SCHEMA) cls.es_builder = ElasticsearchQueryBuilder( - **schema_analizer.query_builder_options() + **schema_analizer.query_builder_options(), ) add_data() From 104f8a799ccb2a5b7feea4d789480da7d7cafdca Mon Sep 17 00:00:00 2001 From: Thomas Brognoli Date: Fri, 15 Feb 2019 09:59:11 +0100 Subject: [PATCH 07/26] Test travis with Tox --- .travis.yml | 15 +++++++++------ requirements-dev.txt | 2 +- requirements.txt | 1 + 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 991d7ec..37e2f51 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,19 +1,22 @@ language: python # Existing Python versions -python: - - 3.4 - - 3.5 - - 3.6 +# python: +# - 3.4 +# - 3.5 +# - 3.6 # Enable 3.7 without globally enabling sudo and dist: xenial for other build jobs matrix: include: - - python: 3.7 + - env: TOX_ENV=py37-django-21-es6 ES_APT_URL=https://artifacts.elastic.co/packages/6.x/apt + python: 3.7 dist: xenial sudo: true + - env: TOX_ENV=py36-django-110-es2 ES_APT_URL=https://packages.elastic.co/elasticsearch/2.x/debian + python: 3.6 before_install: - wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - - - echo "deb https://packages.elastic.co/elasticsearch/2.x/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elastic.list + - echo "deb $ES_APT_URL stable main" | sudo tee -a /etc/apt/sources.list.d/elastic.list - sudo apt-get update && sudo apt-get install elasticsearch -y - sudo service elasticsearch start diff --git a/requirements-dev.txt b/requirements-dev.txt index 8808651..17df8af 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,7 +1,7 @@ -r requirements.txt coverage==4.0.3 -elasticsearch-dsl==2.2.0 +elasticsearch-dsl==6.3.1 flake8==2.5.4 nose==1.3.7 Sphinx==1.4.1 diff --git a/requirements.txt b/requirements.txt index 0ac3887..f63a7e9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ ply==3.11 +tox==3.7.0 From 9d6dbcf97401043eae84d0197fc98dfc27784c54 Mon Sep 17 00:00:00 2001 From: Thomas Brognoli Date: Fri, 15 Feb 2019 10:29:59 +0100 Subject: [PATCH 08/26] add travis test --- .travis.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 37e2f51..e230afb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,12 +7,24 @@ language: python # Enable 3.7 without globally enabling sudo and dist: xenial for other build jobs matrix: include: + - env: TOX_ENV=py36-django-110-es2 ES_APT_URL=https://packages.elastic.co/elasticsearch/2.x/debian + python: 3.6 + - env: TOX_ENV=py36-django-110-es5 ES_APT_URL=https://artifacts.elastic.co/packages/5.x/apt + python: 3.6 + - env: TOX_ENV=py36-django-110-es6 ES_APT_URL=https://artifacts.elastic.co/packages/6.x/apt + python: 3.6 + - env: TOX_ENV=py37-django-110-es2 ES_APT_URL=https://packages.elastic.co/elasticsearch/2.x/debian + python: 3.7 + sudo: true + dist: xenial + - env: TOX_ENV=py37-django-110-es5 ES_APT_URL=https://artifacts.elastic.co/packages/5.x/apt + python: 3.7 + sudo: true + dist: xenial - env: TOX_ENV=py37-django-21-es6 ES_APT_URL=https://artifacts.elastic.co/packages/6.x/apt python: 3.7 dist: xenial sudo: true - - env: TOX_ENV=py36-django-110-es2 ES_APT_URL=https://packages.elastic.co/elasticsearch/2.x/debian - python: 3.6 before_install: - wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - From abfc85c1673fd59ddfef6e560cf31c43b15d20dd Mon Sep 17 00:00:00 2001 From: Thomas Brognoli Date: Fri, 15 Feb 2019 10:46:54 +0100 Subject: [PATCH 09/26] Show es version before running test --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index e230afb..5654d5d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,6 +31,8 @@ before_install: - echo "deb $ES_APT_URL stable main" | sudo tee -a /etc/apt/sources.list.d/elastic.list - sudo apt-get update && sudo apt-get install elasticsearch -y - sudo service elasticsearch start + - elasticsearch -v + - curl localhost:9200 install: - pip install . From 20da15963a847c8591e1e78e08fb4049d7679189 Mon Sep 17 00:00:00 2001 From: Thomas Brognoli Date: Fri, 15 Feb 2019 11:03:49 +0100 Subject: [PATCH 10/26] Tests travis --- .travis.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5654d5d..42e1f15 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,21 +7,21 @@ language: python # Enable 3.7 without globally enabling sudo and dist: xenial for other build jobs matrix: include: - - env: TOX_ENV=py36-django-110-es2 ES_APT_URL=https://packages.elastic.co/elasticsearch/2.x/debian + - env: ES_APT_URL=https://packages.elastic.co/elasticsearch/2.x/debian ES_DSL_VERS=2.2.0 python: 3.6 - - env: TOX_ENV=py36-django-110-es5 ES_APT_URL=https://artifacts.elastic.co/packages/5.x/apt + - env: ES_APT_URL=https://artifacts.elastic.co/packages/5.x/apt ES_DSL_VERS=5.3.0 python: 3.6 - - env: TOX_ENV=py36-django-110-es6 ES_APT_URL=https://artifacts.elastic.co/packages/6.x/apt + - env: ES_APT_URL=https://artifacts.elastic.co/packages/6.x/apt ES_DSL_VERS=6.3.1 python: 3.6 - - env: TOX_ENV=py37-django-110-es2 ES_APT_URL=https://packages.elastic.co/elasticsearch/2.x/debian + - env: ES_APT_URL=https://packages.elastic.co/elasticsearch/2.x/debian ES_DSL_VERS=2.2.0 python: 3.7 sudo: true dist: xenial - - env: TOX_ENV=py37-django-110-es5 ES_APT_URL=https://artifacts.elastic.co/packages/5.x/apt + - env: ES_APT_URL=https://artifacts.elastic.co/packages/5.x/apt ES_DSL_VERS=5.3.0 python: 3.7 sudo: true dist: xenial - - env: TOX_ENV=py37-django-21-es6 ES_APT_URL=https://artifacts.elastic.co/packages/6.x/apt + - env: ES_APT_URL=https://artifacts.elastic.co/packages/6.x/apt ES_DSL_VERS=6.3.1 python: 3.7 dist: xenial sudo: true @@ -31,6 +31,7 @@ before_install: - echo "deb $ES_APT_URL stable main" | sudo tee -a /etc/apt/sources.list.d/elastic.list - sudo apt-get update && sudo apt-get install elasticsearch -y - sudo service elasticsearch start + - sleep 10 - elasticsearch -v - curl localhost:9200 @@ -38,6 +39,7 @@ install: - pip install . - pip install -r requirements-dev.txt - pip install coveralls + - pip install elasticsearch-dsl==$ES_DSL_VERSION script: - make tests From c6aaf7ca7afa85634a48ad8e66c30837a9077dd5 Mon Sep 17 00:00:00 2001 From: Thomas Brognoli Date: Fri, 15 Feb 2019 11:08:14 +0100 Subject: [PATCH 11/26] wip test --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 42e1f15..5e3b980 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,7 +32,7 @@ before_install: - sudo apt-get update && sudo apt-get install elasticsearch -y - sudo service elasticsearch start - sleep 10 - - elasticsearch -v + # - elasticsearch -v - curl localhost:9200 install: From 6a0175f0d5a8661bccfc9e72893d87142ead3029 Mon Sep 17 00:00:00 2001 From: Thomas Brognoli Date: Fri, 15 Feb 2019 11:26:28 +0100 Subject: [PATCH 12/26] test --- .travis.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5e3b980..663fa32 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,11 +7,11 @@ language: python # Enable 3.7 without globally enabling sudo and dist: xenial for other build jobs matrix: include: - - env: ES_APT_URL=https://packages.elastic.co/elasticsearch/2.x/debian ES_DSL_VERS=2.2.0 + - env: ES_APT_URL=https://packages.elastic.co/elasticsearch/2.x/debian ES_DSL_VERS=2.2.0 ES_VERS=2.2.1 python: 3.6 - - env: ES_APT_URL=https://artifacts.elastic.co/packages/5.x/apt ES_DSL_VERS=5.3.0 + - env: ES_APT_URL=https://artifacts.elastic.co/packages/5.x/apt ES_DSL_VERS=5.3.0 ES_VERS=5.6.0 python: 3.6 - - env: ES_APT_URL=https://artifacts.elastic.co/packages/6.x/apt ES_DSL_VERS=6.3.1 + - env: ES_APT_URL=https://artifacts.elastic.co/packages/6.x/apt ES_DSL_VERS=6.3.1 ES_VERS=6.4.3 python: 3.6 - env: ES_APT_URL=https://packages.elastic.co/elasticsearch/2.x/debian ES_DSL_VERS=2.2.0 python: 3.7 @@ -29,17 +29,16 @@ matrix: before_install: - wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - - echo "deb $ES_APT_URL stable main" | sudo tee -a /etc/apt/sources.list.d/elastic.list - - sudo apt-get update && sudo apt-get install elasticsearch -y + - sudo apt-get update && sudo apt-get install elasticsearch=$ES_VERS -y - sudo service elasticsearch start - sleep 10 - # - elasticsearch -v - curl localhost:9200 install: - pip install . - pip install -r requirements-dev.txt - pip install coveralls - - pip install elasticsearch-dsl==$ES_DSL_VERSION + - pip install elasticsearch-dsl==$ES_DSL_VERS script: - make tests From c77103b8ceed02a1752b4c8b1238c30b3fe97323 Mon Sep 17 00:00:00 2001 From: Thomas Brognoli Date: Fri, 15 Feb 2019 11:33:06 +0100 Subject: [PATCH 13/26] Test --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 663fa32..fa96f17 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,15 +13,15 @@ matrix: python: 3.6 - env: ES_APT_URL=https://artifacts.elastic.co/packages/6.x/apt ES_DSL_VERS=6.3.1 ES_VERS=6.4.3 python: 3.6 - - env: ES_APT_URL=https://packages.elastic.co/elasticsearch/2.x/debian ES_DSL_VERS=2.2.0 + - env: ES_APT_URL=https://packages.elastic.co/elasticsearch/2.x/debian ES_DSL_VERS=2.2.0 ES_VERS=2.2.1 python: 3.7 sudo: true dist: xenial - - env: ES_APT_URL=https://artifacts.elastic.co/packages/5.x/apt ES_DSL_VERS=5.3.0 + - env: ES_APT_URL=https://artifacts.elastic.co/packages/5.x/apt ES_DSL_VERS=5.3.0 ES_VERS=5.6.0 python: 3.7 sudo: true dist: xenial - - env: ES_APT_URL=https://artifacts.elastic.co/packages/6.x/apt ES_DSL_VERS=6.3.1 + - env: ES_APT_URL=https://artifacts.elastic.co/packages/6.x/apt ES_DSL_VERS=6.3.1 ES_VERS=6.4.3 python: 3.7 dist: xenial sudo: true @@ -31,7 +31,7 @@ before_install: - echo "deb $ES_APT_URL stable main" | sudo tee -a /etc/apt/sources.list.d/elastic.list - sudo apt-get update && sudo apt-get install elasticsearch=$ES_VERS -y - sudo service elasticsearch start - - sleep 10 + - sleep 20 - curl localhost:9200 install: From 8f9ee0de3e01fee1d1e8fdcf0ef2ebe5418d0ba5 Mon Sep 17 00:00:00 2001 From: Thomas Brognoli Date: Fri, 15 Feb 2019 12:01:29 +0100 Subject: [PATCH 14/26] WIP --- .travis.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index fa96f17..96d6a73 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,5 @@ language: python -# Existing Python versions -# python: -# - 3.4 -# - 3.5 -# - 3.6 -# Enable 3.7 without globally enabling sudo and dist: xenial for other build jobs + matrix: include: - env: ES_APT_URL=https://packages.elastic.co/elasticsearch/2.x/debian ES_DSL_VERS=2.2.0 ES_VERS=2.2.1 @@ -31,7 +26,7 @@ before_install: - echo "deb $ES_APT_URL stable main" | sudo tee -a /etc/apt/sources.list.d/elastic.list - sudo apt-get update && sudo apt-get install elasticsearch=$ES_VERS -y - sudo service elasticsearch start - - sleep 20 + - sleep 25 - curl localhost:9200 install: From 4578e04bd5dfe12a44471911f1304fa5924b41f9 Mon Sep 17 00:00:00 2001 From: Thomas Brognoli Date: Fri, 15 Feb 2019 12:08:55 +0100 Subject: [PATCH 15/26] test --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 96d6a73..4f1d4e3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,7 @@ matrix: before_install: - wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - - echo "deb $ES_APT_URL stable main" | sudo tee -a /etc/apt/sources.list.d/elastic.list - - sudo apt-get update && sudo apt-get install elasticsearch=$ES_VERS -y + - sudo apt-get update && sudo apt-get install elasticsearch=$ES_VERS -y --allow-downgrades - sudo service elasticsearch start - sleep 25 - curl localhost:9200 From 8fad75b06fd2d68feb8934a9710e231f02819d17 Mon Sep 17 00:00:00 2001 From: Thomas Brognoli Date: Fri, 15 Feb 2019 12:43:02 +0100 Subject: [PATCH 16/26] wip --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 4f1d4e3..d038d69 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,6 +23,7 @@ matrix: before_install: - wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - + - sudo apt-get update - echo "deb $ES_APT_URL stable main" | sudo tee -a /etc/apt/sources.list.d/elastic.list - sudo apt-get update && sudo apt-get install elasticsearch=$ES_VERS -y --allow-downgrades - sudo service elasticsearch start From 446afb49e0809dd1791cc9470d9d490eb38c64e1 Mon Sep 17 00:00:00 2001 From: Thomas Brognoli Date: Fri, 15 Feb 2019 14:11:27 +0100 Subject: [PATCH 17/26] WIP --- .travis.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index d038d69..6633885 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,13 +22,19 @@ matrix: sudo: true before_install: - - wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - - - sudo apt-get update - - echo "deb $ES_APT_URL stable main" | sudo tee -a /etc/apt/sources.list.d/elastic.list - - sudo apt-get update && sudo apt-get install elasticsearch=$ES_VERS -y --allow-downgrades - - sudo service elasticsearch start - - sleep 25 - - curl localhost:9200 + - mkdir /tmp/elasticsearch + - wget -O - https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ES_VERS}.tar.gz | tar xz --directory=/tmp/elasticsearch --strip-components=1 + - /tmp/elasticsearch/bin/elasticsearch -d + - pip install git+https://github.com/elastic/elasticsearch-py.git@${ES_VERS}#egg=elasticsearch + - pip install . + + + # - wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - + # - echo "deb $ES_APT_URL stable main" | sudo tee -a /etc/apt/sources.list.d/elastic.list + # - sudo apt-get update && sudo apt-get install elasticsearch=$ES_VERS -y --allow-downgrades + # - sudo service elasticsearch start + # - sleep 25 + # - curl localhost:9200 install: - pip install . From 7cc5617cb9077cb74ed56ff3b1b5fc339286a863 Mon Sep 17 00:00:00 2001 From: Thomas Brognoli Date: Fri, 15 Feb 2019 14:14:37 +0100 Subject: [PATCH 18/26] WIP --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6633885..44153fb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,9 +23,9 @@ matrix: before_install: - mkdir /tmp/elasticsearch - - wget -O - https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ES_VERS}.tar.gz | tar xz --directory=/tmp/elasticsearch --strip-components=1 + - wget -O - https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-$ES_VERS.tar.gz | tar xz --directory=/tmp/elasticsearch --strip-components=1 - /tmp/elasticsearch/bin/elasticsearch -d - - pip install git+https://github.com/elastic/elasticsearch-py.git@${ES_VERS}#egg=elasticsearch + - pip install git+https://github.com/elastic/elasticsearch-py.git@ES_VERS - pip install . From 0189a19c529b89ac6d95d3cd6af499f9c3d47bf4 Mon Sep 17 00:00:00 2001 From: Thomas Brognoli Date: Fri, 15 Feb 2019 14:30:25 +0100 Subject: [PATCH 19/26] WIP --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 44153fb..1f612fa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,8 +25,8 @@ before_install: - mkdir /tmp/elasticsearch - wget -O - https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-$ES_VERS.tar.gz | tar xz --directory=/tmp/elasticsearch --strip-components=1 - /tmp/elasticsearch/bin/elasticsearch -d - - pip install git+https://github.com/elastic/elasticsearch-py.git@ES_VERS - - pip install . + # - pip install git+https://github.com/elastic/elasticsearch-py.git@$ES_VERS + # - pip install . # - wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - From 5cced4cefa0f792c80b5d1ab73dc73b048603fa9 Mon Sep 17 00:00:00 2001 From: Thomas Brognoli Date: Fri, 15 Feb 2019 14:34:33 +0100 Subject: [PATCH 20/26] WIP --- .travis.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1f612fa..3e2527d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,16 +25,8 @@ before_install: - mkdir /tmp/elasticsearch - wget -O - https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-$ES_VERS.tar.gz | tar xz --directory=/tmp/elasticsearch --strip-components=1 - /tmp/elasticsearch/bin/elasticsearch -d - # - pip install git+https://github.com/elastic/elasticsearch-py.git@$ES_VERS - # - pip install . - - - # - wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - - # - echo "deb $ES_APT_URL stable main" | sudo tee -a /etc/apt/sources.list.d/elastic.list - # - sudo apt-get update && sudo apt-get install elasticsearch=$ES_VERS -y --allow-downgrades - # - sudo service elasticsearch start - # - sleep 25 - # - curl localhost:9200 + - sleep 25 + - curl localhost:9200 install: - pip install . From a06331569dfdb923b767b7f8a15a062465816a49 Mon Sep 17 00:00:00 2001 From: Thomas Brognoli Date: Fri, 15 Feb 2019 14:44:25 +0100 Subject: [PATCH 21/26] wip --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3e2527d..c7d38ff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,7 +23,7 @@ matrix: before_install: - mkdir /tmp/elasticsearch - - wget -O - https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-$ES_VERS.tar.gz | tar xz --directory=/tmp/elasticsearch --strip-components=1 + - wget -O - https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/$ES_VERS/elasticsearch-$ES_VERS.tar.gz | tar xz --directory=/tmp/elasticsearch --strip-components=1 - /tmp/elasticsearch/bin/elasticsearch -d - sleep 25 - curl localhost:9200 From 9063fceb997c02483166c0a976413a78e2d26e13 Mon Sep 17 00:00:00 2001 From: Thomas Brognoli Date: Fri, 15 Feb 2019 14:50:26 +0100 Subject: [PATCH 22/26] WIP --- .travis.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index c7d38ff..972afc6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,28 +2,28 @@ language: python matrix: include: - - env: ES_APT_URL=https://packages.elastic.co/elasticsearch/2.x/debian ES_DSL_VERS=2.2.0 ES_VERS=2.2.1 + - env: ES_APT_URL=https://packages.elastic.co/elasticsearch/2.x/debian ES_DSL_VERS=2.2.0 ES_VERS=https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.4.2/elasticsearch-2.4.2.tar.gz python: 3.6 - - env: ES_APT_URL=https://artifacts.elastic.co/packages/5.x/apt ES_DSL_VERS=5.3.0 ES_VERS=5.6.0 + - env: ES_APT_URL=https://artifacts.elastic.co/packages/5.x/apt ES_DSL_VERS=5.3.0 ES_VERS=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.0.tar.gz python: 3.6 - env: ES_APT_URL=https://artifacts.elastic.co/packages/6.x/apt ES_DSL_VERS=6.3.1 ES_VERS=6.4.3 python: 3.6 - - env: ES_APT_URL=https://packages.elastic.co/elasticsearch/2.x/debian ES_DSL_VERS=2.2.0 ES_VERS=2.2.1 + - env: ES_APT_URL=https://packages.elastic.co/elasticsearch/2.x/debian ES_DSL_VERS=2.2.0 ES_VERS=https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.2.1/elasticsearch-2.2.1.tar.gz python: 3.7 sudo: true dist: xenial - - env: ES_APT_URL=https://artifacts.elastic.co/packages/5.x/apt ES_DSL_VERS=5.3.0 ES_VERS=5.6.0 + - env: ES_APT_URL=https://artifacts.elastic.co/packages/5.x/apt ES_DSL_VERS=5.3.0 ES_VERS=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.0.tar.gz python: 3.7 sudo: true dist: xenial - - env: ES_APT_URL=https://artifacts.elastic.co/packages/6.x/apt ES_DSL_VERS=6.3.1 ES_VERS=6.4.3 + - env: ES_APT_URL=https://artifacts.elastic.co/packages/6.x/apt ES_DSL_VERS=6.3.1 ES_VERS=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.4.3.tar.gz python: 3.7 dist: xenial sudo: true before_install: - mkdir /tmp/elasticsearch - - wget -O - https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/$ES_VERS/elasticsearch-$ES_VERS.tar.gz | tar xz --directory=/tmp/elasticsearch --strip-components=1 + - wget -O - https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-$ES_VERS.tar.gz | tar xz --directory=/tmp/elasticsearch --strip-components=1 - /tmp/elasticsearch/bin/elasticsearch -d - sleep 25 - curl localhost:9200 From 52b1c1c2803eb92312494dc519d8aa56723a32a3 Mon Sep 17 00:00:00 2001 From: Thomas Brognoli Date: Fri, 15 Feb 2019 14:55:41 +0100 Subject: [PATCH 23/26] WIP --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 972afc6..0da3b67 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: python matrix: include: - - env: ES_APT_URL=https://packages.elastic.co/elasticsearch/2.x/debian ES_DSL_VERS=2.2.0 ES_VERS=https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.4.2/elasticsearch-2.4.2.tar.gz + - env: ES_APT_URL=https://packages.elastic.co/elasticsearch/2.x/debian ES_DSL_VERS=2.2.0 ES_VERS=https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.2.1/elasticsearch-2.4.2.tar.gz python: 3.6 - env: ES_APT_URL=https://artifacts.elastic.co/packages/5.x/apt ES_DSL_VERS=5.3.0 ES_VERS=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.0.tar.gz python: 3.6 @@ -23,7 +23,7 @@ matrix: before_install: - mkdir /tmp/elasticsearch - - wget -O - https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-$ES_VERS.tar.gz | tar xz --directory=/tmp/elasticsearch --strip-components=1 + - wget -O - $ES_VERS | tar xz --directory=/tmp/elasticsearch --strip-components=1 - /tmp/elasticsearch/bin/elasticsearch -d - sleep 25 - curl localhost:9200 From 9893476a37980c51d6138eed2542a045ca934055 Mon Sep 17 00:00:00 2001 From: Thomas Brognoli Date: Fri, 15 Feb 2019 15:19:32 +0100 Subject: [PATCH 24/26] wip --- .travis.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0da3b67..976bfe4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,29 +2,32 @@ language: python matrix: include: - - env: ES_APT_URL=https://packages.elastic.co/elasticsearch/2.x/debian ES_DSL_VERS=2.2.0 ES_VERS=https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.2.1/elasticsearch-2.4.2.tar.gz + - env: ES_APT_URL=https://packages.elastic.co/elasticsearch/2.x/debian ES_DSL_VERS=2.2.0 ES_VERS=2.2.1 python: 3.6 - - env: ES_APT_URL=https://artifacts.elastic.co/packages/5.x/apt ES_DSL_VERS=5.3.0 ES_VERS=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.0.tar.gz + - env: ES_APT_URL=https://artifacts.elastic.co/packages/5.x/apt ES_DSL_VERS=5.3.0 ES_VERS=5.6.0 python: 3.6 - env: ES_APT_URL=https://artifacts.elastic.co/packages/6.x/apt ES_DSL_VERS=6.3.1 ES_VERS=6.4.3 python: 3.6 - - env: ES_APT_URL=https://packages.elastic.co/elasticsearch/2.x/debian ES_DSL_VERS=2.2.0 ES_VERS=https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.2.1/elasticsearch-2.2.1.tar.gz + - env: ES_APT_URL=https://packages.elastic.co/elasticsearch/2.x/debian ES_DSL_VERS=2.2.0 ES_VERS=2.2.1 python: 3.7 sudo: true dist: xenial - - env: ES_APT_URL=https://artifacts.elastic.co/packages/5.x/apt ES_DSL_VERS=5.3.0 ES_VERS=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.0.tar.gz + - env: ES_APT_URL=https://artifacts.elastic.co/packages/5.x/apt ES_DSL_VERS=5.3.0 ES_VERS=5.6.0 python: 3.7 sudo: true dist: xenial - - env: ES_APT_URL=https://artifacts.elastic.co/packages/6.x/apt ES_DSL_VERS=6.3.1 ES_VERS=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.4.3.tar.gz + - env: ES_APT_URL=https://artifacts.elastic.co/packages/6.x/apt ES_DSL_VERS=6.3.1 ES_VERS=6.4.3 python: 3.7 dist: xenial sudo: true before_install: - - mkdir /tmp/elasticsearch - - wget -O - $ES_VERS | tar xz --directory=/tmp/elasticsearch --strip-components=1 - - /tmp/elasticsearch/bin/elasticsearch -d + - sudo rm /etc/apt/sources.list; sudo touch /etc/apt/sources.list + - sudo rm -rf /etc/apt/sources.list.d; sudo mkdir sources.list.d + - wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - + - echo "deb $ES_APT_URL stable main" | sudo tee -a /etc/apt/sources.list.d/elastic.list + - sudo apt-get update && sudo apt-get install elasticsearch=$ES_VERS -y + - sudo service elasticsearch start - sleep 25 - curl localhost:9200 From 62a41f9c4d87066e1d7121e0d5a1050747a84b70 Mon Sep 17 00:00:00 2001 From: Thomas Brognoli Date: Fri, 15 Feb 2019 15:22:56 +0100 Subject: [PATCH 25/26] WIP --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 976bfe4..52bcf8f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,7 +23,7 @@ matrix: before_install: - sudo rm /etc/apt/sources.list; sudo touch /etc/apt/sources.list - - sudo rm -rf /etc/apt/sources.list.d; sudo mkdir sources.list.d + # - sudo rm -rf /etc/apt/sources.list.d; sudo mkdir sources.list.d - wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - - echo "deb $ES_APT_URL stable main" | sudo tee -a /etc/apt/sources.list.d/elastic.list - sudo apt-get update && sudo apt-get install elasticsearch=$ES_VERS -y From 11b27f367af6f6bb0c8369b909e29f1b64119160 Mon Sep 17 00:00:00 2001 From: Thomas Brognoli Date: Fri, 15 Feb 2019 15:27:34 +0100 Subject: [PATCH 26/26] WIP --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 52bcf8f..5bfd826 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,7 @@ before_install: # - sudo rm -rf /etc/apt/sources.list.d; sudo mkdir sources.list.d - wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - - echo "deb $ES_APT_URL stable main" | sudo tee -a /etc/apt/sources.list.d/elastic.list - - sudo apt-get update && sudo apt-get install elasticsearch=$ES_VERS -y + - sudo apt-get update && sudo apt-get install elasticsearch=$ES_VERS -y --allow-downgrades - sudo service elasticsearch start - sleep 25 - curl localhost:9200