Set up CI for elasticsearch-oss
Signed-off-by: Rushi Agrawal <agrrushi@amazon.com>
This commit is contained in:
@@ -18,14 +18,14 @@ require_stack_version
|
||||
if [[ -z $es_node_name ]]; then
|
||||
# only set these once
|
||||
set -euo pipefail
|
||||
export TEST_SUITE=${TEST_SUITE-platinum}
|
||||
export TEST_SUITE=${TEST_SUITE-free}
|
||||
export RUNSCRIPTS=${RUNSCRIPTS-}
|
||||
export DETACH=${DETACH-false}
|
||||
export CLEANUP=${CLEANUP-false}
|
||||
|
||||
export es_node_name=instance
|
||||
export elastic_password=changeme
|
||||
export elasticsearch_image=elasticsearch
|
||||
export elasticsearch_image=elasticsearch-oss
|
||||
export elasticsearch_url=https://elastic:${elastic_password}@${es_node_name}:9200
|
||||
if [[ $TEST_SUITE != "platinum" ]]; then
|
||||
export elasticsearch_url=http://${es_node_name}:9200
|
||||
@@ -56,4 +56,3 @@ fi
|
||||
|
||||
echo -e "\033[34;1mINFO:\033[0m Creating network $network_name if it does not exist already \033[0m"
|
||||
docker network inspect "$network_name" > /dev/null 2>&1 || docker network create "$network_name"
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
# - Added 5 retries on docker pull for fixing transient network errors
|
||||
# - Added flags to make local CCR configurations work
|
||||
# - Added action.destructive_requires_name=false as the default will be true in v8
|
||||
# - Added ingest.geoip.downloader.enabled=false as it causes false positives in testing
|
||||
|
||||
script_path=$(dirname $(realpath -s $0))
|
||||
source $script_path/functions/imports.sh
|
||||
@@ -41,24 +40,11 @@ environment=($(cat <<-END
|
||||
--env path.repo=/tmp
|
||||
--env repositories.url.allowed_urls=http://snapshot.test*
|
||||
--env action.destructive_requires_name=false
|
||||
--env ingest.geoip.downloader.enabled=false
|
||||
END
|
||||
))
|
||||
if [[ "$TEST_SUITE" == "platinum" ]]; then
|
||||
environment+=($(cat <<-END
|
||||
--env ELASTIC_PASSWORD=$elastic_password
|
||||
--env xpack.license.self_generated.type=trial
|
||||
--env xpack.security.enabled=true
|
||||
--env xpack.security.http.ssl.enabled=true
|
||||
--env xpack.security.http.ssl.verification_mode=certificate
|
||||
--env xpack.security.http.ssl.key=certs/testnode.key
|
||||
--env xpack.security.http.ssl.certificate=certs/testnode.crt
|
||||
--env xpack.security.http.ssl.certificate_authorities=certs/ca.crt
|
||||
--env xpack.security.transport.ssl.enabled=true
|
||||
--env xpack.security.transport.ssl.verification_mode=certificate
|
||||
--env xpack.security.transport.ssl.key=certs/testnode.key
|
||||
--env xpack.security.transport.ssl.certificate=certs/testnode.crt
|
||||
--env xpack.security.transport.ssl.certificate_authorities=certs/ca.crt
|
||||
END
|
||||
))
|
||||
volumes+=($(cat <<-END
|
||||
@@ -110,7 +96,7 @@ END
|
||||
docker run \
|
||||
--name "$node_name" \
|
||||
--network "$network_name" \
|
||||
--env "ES_JAVA_OPTS=-Xms1g -Xmx1g -da:org.elasticsearch.xpack.ccr.index.engine.FollowingEngineAssertions" \
|
||||
--env "ES_JAVA_OPTS=-Xms1g -Xmx1g" \
|
||||
"${environment[@]}" \
|
||||
"${volumes[@]}" \
|
||||
--publish "$http_port":9200 \
|
||||
|
||||
+2
-2
@@ -5,8 +5,8 @@
|
||||
# - Add `$RUNSCRIPTS` env var for running Elasticsearch dependent products
|
||||
|
||||
# Default environment variables
|
||||
export STACK_VERSION="${STACK_VERSION:=8.0.0-SNAPSHOT}"
|
||||
export TEST_SUITE="${TEST_SUITE:=platinum}"
|
||||
export STACK_VERSION="${STACK_VERSION:=7.10.2}"
|
||||
export TEST_SUITE="${TEST_SUITE:=free}"
|
||||
export PYTHON_VERSION="${PYTHON_VERSION:=3.9}"
|
||||
export PYTHON_CONNECTION_CLASS="${PYTHON_CONNECTION_CLASS:=Urllib3HttpConnection}"
|
||||
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
STACK_VERSION:
|
||||
- 7.x-SNAPSHOT
|
||||
- 7.10.2
|
||||
|
||||
TEST_SUITE:
|
||||
- platinum
|
||||
- free
|
||||
|
||||
PYTHON_VERSION:
|
||||
- "2.7"
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
name: Integration tests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- 'README.md'
|
||||
branches:
|
||||
- "*"
|
||||
push:
|
||||
paths-ignore:
|
||||
- 'README.md'
|
||||
branches:
|
||||
- "*"
|
||||
|
||||
jobs:
|
||||
assemble:
|
||||
name: Assemble
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
stack_version: ['7.10.2']
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- run: "./.ci/run-tests"
|
||||
name: Integ ${{ matrix.stack_version }}
|
||||
@@ -4,14 +4,13 @@ on:
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- 'README.md'
|
||||
branches:
|
||||
- "*"
|
||||
push:
|
||||
paths-ignore:
|
||||
- 'README.md'
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
- '[0-9]+.[0-9]+'
|
||||
- '[0-9]+.x'
|
||||
- "*"
|
||||
|
||||
jobs:
|
||||
assemble:
|
||||
@@ -20,7 +19,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
stack_version: ['7.x-SNAPSHOT']
|
||||
stack_version: ['7.10.2']
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
||||
@@ -15,4 +15,4 @@
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
__versionstr__ = "7.15.0"
|
||||
__versionstr__ = "7.10.2"
|
||||
|
||||
Reference in New Issue
Block a user