diff --git a/testing/infra/terraform/modules/standalone_apm_server/latest_apm_server.sh b/testing/infra/terraform/modules/standalone_apm_server/latest_apm_server.sh index 3946546080e..13596905bc4 100755 --- a/testing/infra/terraform/modules/standalone_apm_server/latest_apm_server.sh +++ b/testing/infra/terraform/modules/standalone_apm_server/latest_apm_server.sh @@ -4,7 +4,7 @@ set -eo pipefail VERSION=${1} if [[ -z ${VERSION} ]] || [[ "${VERSION}" == "latest" ]]; then - VERSION=$(curl -s "https://artifacts-api.elastic.co/v1/versions" | jq -r '.versions[-1]') + VERSION=$(curl -s "https://artifacts-api.elastic.co/v1/versions" | jq -r '[.versions[] | select(. | startswith("8"))] | last') fi LATEST_BUILD=$(curl -s "https://artifacts-api.elastic.co/v1/versions/${VERSION}/builds/" | jq -r '.builds[0]') diff --git a/testing/infra/terraform/modules/standalone_apm_server/latest_elastic_agent.sh b/testing/infra/terraform/modules/standalone_apm_server/latest_elastic_agent.sh index 02df3188d5a..58c0112ad24 100755 --- a/testing/infra/terraform/modules/standalone_apm_server/latest_elastic_agent.sh +++ b/testing/infra/terraform/modules/standalone_apm_server/latest_elastic_agent.sh @@ -4,7 +4,7 @@ set -eo pipefail VERSION=${1} if [[ -z ${VERSION} ]] || [[ "${VERSION}" == "latest" ]]; then - VERSION=$(curl -s "https://artifacts-api.elastic.co/v1/versions" | jq -r '.versions[-1]') + VERSION=$(curl -s "https://artifacts-api.elastic.co/v1/versions" | jq -r '[.versions[] | select(. | startswith("8"))] | last') fi LATEST_BUILD=$(curl -s "https://artifacts-api.elastic.co/v1/versions/${VERSION}/builds/" | jq -r '.builds[0]') diff --git a/testing/smoke/legacy-standalone-major-managed/test.sh b/testing/smoke/legacy-standalone-major-managed/test.sh index c22c1cd1ecd..3e5da98a1c1 100755 --- a/testing/smoke/legacy-standalone-major-managed/test.sh +++ b/testing/smoke/legacy-standalone-major-managed/test.sh @@ -17,7 +17,12 @@ if [[ "${1}" == "latest" ]]; then LATEST_VERSION=${LATEST_SNAPSHOT_VERSION} ASSERTION_VERSION=${LATEST_SNAPSHOT_VERSION%-*} # strip -SNAPSHOT suffix get_latest_snapshot - NEXT_MAJOR_LATEST=$(echo $VERSIONS | jq -r -c '.[-1]') + # NOTE(marclop) Temporarily avoid testing against 9.x, since we want to test that the + # upgrade for 7.17 to 8.latest works correctly. + # Uncomment the line below when we are ready to test against 9.x and delete the line + # after the next one. + # NEXT_MAJOR_LATEST=$(echo $VERSIONS | jq -r -c '.[-1]') + NEXT_MAJOR_LATEST=$(echo ${VERSIONS} | jq -r '[.[] | select(. | startswith("8"))] | last') ASSERTION_NEXT_MAJOR_LATEST=${NEXT_MAJOR_LATEST%-*} # strip -SNAPSHOT suffix else get_latest_patch ${VERSION} diff --git a/testing/smoke/supported-os/test.sh b/testing/smoke/supported-os/test.sh index b479743513f..b7b9a3f148c 100755 --- a/testing/smoke/supported-os/test.sh +++ b/testing/smoke/supported-os/test.sh @@ -2,4 +2,9 @@ set -eo pipefail -. $(git rev-parse --show-toplevel)/testing/smoke/test_supported_os.sh +# NOTE(marclop) temporarily avoid testing against 9.x, since it's currently in +# its infancy and very far out. +# Remove this line when we are ready to test against 9.x and the ${VERSION} +# argument in the test_supported_os.sh script. +VERSION=latest +. $(git rev-parse --show-toplevel)/testing/smoke/test_supported_os.sh ${VERSION} diff --git a/testing/smoke/test_supported_os.sh b/testing/smoke/test_supported_os.sh index 9249b1a5eb4..be3172429cc 100644 --- a/testing/smoke/test_supported_os.sh +++ b/testing/smoke/test_supported_os.sh @@ -14,7 +14,12 @@ get_latest_snapshot VERSION=${1} if [[ -z ${VERSION} ]] || [[ "${VERSION}" == "latest" ]]; then - VERSION=$(echo ${VERSIONS} | jq -r 'last') + # NOTE(marclop) Temporarily avoid testing against 9.x, since we want to test that the + # upgrade for 7.17 to 8.latest works correctly. + # Uncomment the line below when we are ready to test against 9.x and delete the line + # after the next one. + # VERSION=$(echo ${VERSIONS} | jq -r 'last') + VERSION=$(echo ${VERSIONS} | jq -r '[.[] | select(. | startswith("8"))] | last') echo "-> unspecified version, using $(echo ${VERSION} | cut -d '.' -f1-2)" fi MAJOR_VERSION=$(echo ${VERSION} | cut -d '.' -f1 )