diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c7dec38f..583e92f9 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -43,7 +43,6 @@ jobs: LOGSTASH_VERSION: ${{ matrix.logstash }} OPENSEARCH_VERSION: ${{ matrix.opensearch }} SECURE_INTEGRATION: ${{ matrix.secure }} - IS_OPENDISTRO: "no" steps: - name: Checkout plugin uses: actions/checkout@v1 @@ -69,7 +68,6 @@ jobs: LOGSTASH_VERSION: ${{ matrix.logstash }} OPENDISTRO_VERSION: ${{ matrix.opendistro }} SECURE_INTEGRATION: ${{ matrix.secure }} - IS_OPENDISTRO: "yes" steps: - name: Checkout plugin uses: actions/checkout@v1 diff --git a/scripts/docker.env b/scripts/docker.env index eb5fd523..e54794e8 100755 --- a/scripts/docker.env +++ b/scripts/docker.env @@ -2,4 +2,4 @@ # - `-Xregexp.interruptible=true -Xcompile.invokedynamic=true -Xjit.threshold=0` LS base-line # - `-XX:+UseParallelGC` do not use G1 (default) on Java 11 # - `-v -W1` print JRuby version but do not go verbose -JRUBY_OPTS=-Xregexp.interruptible=true -Xcompile.invokedynamic=true -Xjit.threshold=0 -J-XX:+UseParallelGC -J-XX:+PrintCommandLineFlags -v -W1 +JRUBY_OPTS=-Xregexp.interruptible=true -Xcompile.invokedynamic=true -Xjit.threshold=0 -J-XX:+UseParallelGC -J-XX:+PrintCommandLineFlags -v -W1 \ No newline at end of file diff --git a/scripts/logstash-run.sh b/scripts/logstash-run.sh index 02d60105..a2a5199d 100755 --- a/scripts/logstash-run.sh +++ b/scripts/logstash-run.sh @@ -9,7 +9,7 @@ if [[ "$SECURE_INTEGRATION" == "true" ]]; then OPENSEARCH_REQUIRED_VERSION="2.12.0" # Starting in 2.12.0, security demo configuration script requires an initial admin password COMPARE_VERSION=`echo $OPENSEARCH_REQUIRED_VERSION $OPENSEARCH_VERSION | tr ' ' '\n' | sort -V | uniq | head -n 1` - if [ "$IS_OPENDISTRO" == "yes" ] || [ "$COMPARE_VERSION" != "$OPENSEARCH_REQUIRED_VERSION" ]; then + if [ -n "$OPENDISTRO_VERSION" ] || [ "$COMPARE_VERSION" != "$OPENSEARCH_REQUIRED_VERSION" ]; then CREDENTIAL="admin:admin" else CREDENTIAL="admin:myStrongPassword123!" diff --git a/scripts/opendistro/docker-compose.override.yml b/scripts/opendistro/docker-compose.override.yml index 260a3e17..e36911c2 100644 --- a/scripts/opendistro/docker-compose.override.yml +++ b/scripts/opendistro/docker-compose.override.yml @@ -7,6 +7,7 @@ services: environment: - INTEGRATION=true - SECURE_INTEGRATION=${SECURE_INTEGRATION:-false} + - OPENDISTRO_VERSION=${OPENDISTRO_VERSION} integration: build: diff --git a/spec/opensearch_spec_helper.rb b/spec/opensearch_spec_helper.rb index 4a33cdc4..a973dcd6 100644 --- a/spec/opensearch_spec_helper.rb +++ b/spec/opensearch_spec_helper.rb @@ -74,7 +74,7 @@ def self.check_version?(*requirement) # set admin password based on version def self.admin_password - if check_version?('< 2.12.0') + if check_version?('> 2.12.0') || check_version?('> 7') "admin" else "myStrongPassword123!"