Maintenance: Refactor handling of ES versions in CI.

This commit is contained in:
Martin Gruner 2022-03-23 14:55:33 +01:00
parent f111d0cce3
commit 1049368fc7
2 changed files with 9 additions and 16 deletions

View file

@ -12,6 +12,7 @@
variables: variables:
ES_INDEX_RAND: "true" ES_INDEX_RAND: "true"
ES_URL: "http://elasticsearch:9200" ES_URL: "http://elasticsearch:9200"
ELASTICSEARCH_TAG: '7.16'
.variables_redis_memcached: &variables_redis_memcached .variables_redis_memcached: &variables_redis_memcached
variables: variables:
@ -168,8 +169,6 @@
- <<: *docker_imap - <<: *docker_imap
.services_mysql_postgresql_elasticsearch: &services_mysql_postgresql_elasticsearch .services_mysql_postgresql_elasticsearch: &services_mysql_postgresql_elasticsearch
variables:
ELASTICSEARCH_TAG: 'stable'
services: services:
- <<: *docker_mysql - <<: *docker_mysql
- <<: *docker_postgresql - <<: *docker_postgresql
@ -178,8 +177,6 @@
.services_mysql_postgresql_elasticsearch_selenium_chrome_imap: &services_mysql_postgresql_elasticsearch_selenium_chrome_imap .services_mysql_postgresql_elasticsearch_selenium_chrome_imap: &services_mysql_postgresql_elasticsearch_selenium_chrome_imap
extends: extends:
- .variables_selenium_chrome - .variables_selenium_chrome
variables:
ELASTICSEARCH_TAG: 'stable'
services: services:
- <<: *docker_mysql - <<: *docker_mysql
- <<: *docker_postgresql - <<: *docker_postgresql
@ -190,8 +187,6 @@
.services_mysql_postgresql_elasticsearch_selenium_firefox_imap: &services_mysql_postgresql_elasticsearch_selenium_firefox_imap .services_mysql_postgresql_elasticsearch_selenium_firefox_imap: &services_mysql_postgresql_elasticsearch_selenium_firefox_imap
extends: extends:
- .variables_selenium_firefox - .variables_selenium_firefox
variables:
ELASTICSEARCH_TAG: 'stable'
services: services:
- <<: *docker_mysql - <<: *docker_mysql
- <<: *docker_postgresql - <<: *docker_postgresql
@ -203,8 +198,6 @@
extends: extends:
- .variables_selenium_chrome - .variables_selenium_chrome
- .variables_redis_memcached - .variables_redis_memcached
variables:
ELASTICSEARCH_TAG: 'stable'
services: services:
- <<: *docker_mysql - <<: *docker_mysql
- <<: *docker_postgresql - <<: *docker_postgresql
@ -218,8 +211,6 @@
extends: extends:
- .variables_selenium_firefox - .variables_selenium_firefox
- .variables_redis_memcached - .variables_redis_memcached
variables:
ELASTICSEARCH_TAG: 'stable'
services: services:
- <<: *docker_mysql - <<: *docker_mysql
- <<: *docker_postgresql - <<: *docker_postgresql

View file

@ -14,14 +14,16 @@
- bundle exec rails test test/integration/elasticsearch_test.rb - bundle exec rails test test/integration/elasticsearch_test.rb
- bundle exec rspec --tag searchindex --tag ~type:system --profile 10 - bundle exec rspec --tag searchindex --tag ~type:system --profile 10
"rspec:es:7": # Lowest supported version
<<: *template_integration_es
variables:
ELASTICSEARCH_TAG: '7'
RAILS_ENV: "test"
"rspec:es:7.8": "rspec:es:7.8":
<<: *template_integration_es <<: *template_integration_es
variables: variables:
ELASTICSEARCH_TAG: '7.8.1' ELASTICSEARCH_TAG: '7.8.1'
RAILS_ENV: "test" RAILS_ENV: "test"
# Highest supported version (except for newer releases that are not yet in CI)
"rspec:es:7.16":
<<: *template_integration_es
variables:
ELASTICSEARCH_TAG: '7.16'
RAILS_ENV: "test"