diff --git a/.buildkite/hooks/pre-command b/.buildkite/hooks/pre-command index af49e472ce8..6d5897f3d0d 100755 --- a/.buildkite/hooks/pre-command +++ b/.buildkite/hooks/pre-command @@ -58,6 +58,11 @@ if [[ "$BUILDKITE_STEP_KEY" == *"integration-tests"* ]]; then export API_KEY_TOKEN=$(vault kv get -field apiKey ${CI_ESS_PATH}) echo ${API_KEY_TOKEN} > ./apiKey export TEST_INTEG_AUTH_ESS_APIKEY_FILE=$(realpath ./apiKey) + + # BK analytics + echo "--- Prepare BK test analytics token :vault:" + BUILDKITE_ANALYTICS_TOKEN=$(vault kv get -field token kv/ci-shared/platform-ingest/buildkite_analytics_token) + export BUILDKITE_ANALYTICS_TOKEN fi if [[ "$BUILDKITE_PIPELINE_SLUG" == "elastic-agent-binary-dra" ]]; then diff --git a/.buildkite/scripts/steps/integration_tests.sh b/.buildkite/scripts/steps/integration_tests.sh index 694751bd9b8..834da1cd4c6 100755 --- a/.buildkite/scripts/steps/integration_tests.sh +++ b/.buildkite/scripts/steps/integration_tests.sh @@ -17,12 +17,6 @@ if [[ -n "$STACK_VERSION" ]]; then STACK_VERSION=${STACK_VERSION}"-SNAPSHOT" fi -# TODO: move to common.sh when it's refactored -# BK analytics -echo "--- Prepare BK test analytics token :vault:" -BUILDKITE_ANALYTICS_TOKEN=$(vault kv get -field token kv/ci-shared/platform-ingest/buildkite_analytics_token) -export BUILDKITE_ANALYTICS_TOKEN - # Run integration tests set +e AGENT_STACK_VERSION="${STACK_VERSION}" TEST_INTEG_CLEAN_ON_EXIT=true STACK_PROVISIONER="$STACK_PROVISIONER" SNAPSHOT=true mage $MAGE_TARGET $MAGE_SUBTARGET