From fb680a45618c2d2076dab10997159108212dc6e5 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 27 Sep 2023 12:34:13 +0200 Subject: [PATCH] [main](backport #3469) Refactor agent version pinning in integration test script (#3476) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Refactor agent version pinning in integration test script * remove 8.10.2 version pinning (cherry picked from commit a7b2514bd18713eef48745145185d22377145bef) # Conflicts: # .buildkite/scripts/steps/integration_tests.sh * resolve cherry-pick conflicts --------- Co-authored-by: Paolo ChilĂ  --- .buildkite/scripts/steps/integration_tests.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.buildkite/scripts/steps/integration_tests.sh b/.buildkite/scripts/steps/integration_tests.sh index 243c823f231..6e242ff4072 100755 --- a/.buildkite/scripts/steps/integration_tests.sh +++ b/.buildkite/scripts/steps/integration_tests.sh @@ -3,12 +3,22 @@ set -euo pipefail source .buildkite/scripts/common.sh +# Override the agent package version using a string with format .. +# NOTE: use only after version bump when the new version is not yet available, for example: +# OVERRIDE_AGENT_PACKAGE_VERSION="8.10.3" +OVERRIDE_AGENT_PACKAGE_VERSION="" + +if [[ -n "$OVERRIDE_AGENT_PACKAGE_VERSION" ]]; then + OVERRIDE_TEST_AGENT_VERSION=${OVERRIDE_AGENT_PACKAGE_VERSION}"-SNAPSHOT" +else + OVERRIDE_TEST_AGENT_VERSION="" +fi # PACKAGE -DEV=true EXTERNAL=true SNAPSHOT=true PLATFORMS=linux/amd64,linux/arm64 PACKAGES=tar.gz mage package +AGENT_PACKAGE_VERSION="${OVERRIDE_AGENT_PACKAGE_VERSION}" DEV=true EXTERNAL=true SNAPSHOT=true PLATFORMS=linux/amd64,linux/arm64 PACKAGES=tar.gz mage package # Run integration tests set +e -TEST_INTEG_AUTH_ESS_REGION=azure-eastus2 TEST_INTEG_CLEAN_ON_EXIT=true SNAPSHOT=true mage integration:test +AGENT_VERSION="${OVERRIDE_TEST_AGENT_VERSION}" TEST_INTEG_AUTH_ESS_REGION=azure-eastus2 TEST_INTEG_CLEAN_ON_EXIT=true SNAPSHOT=true mage integration:test TESTS_EXIT_STATUS=$? set -e