diff --git a/.buildkite/hooks/pre-command b/.buildkite/hooks/pre-command index 0fe9b7e3ae6..bb4db5f0948 100755 --- a/.buildkite/hooks/pre-command +++ b/.buildkite/hooks/pre-command @@ -17,7 +17,8 @@ DOCKER_REGISTRY="docker.elastic.co" DOCKER_REGISTRY_SECRET_PATH="kv/ci-shared/platform-ingest/docker_registry_prod" CI_DRA_ROLE_PATH="kv/ci-shared/release/dra-role" CI_GCP_OBS_PATH="kv/ci-shared/observability-ingest/cloud/gcp" -CI_AGENT_QA_OBS_PATH="kv/ci-shared/observability-ingest/elastic-agent-ess-qa" +# CI_AGENT_QA_OBS_PATH="kv/ci-shared/observability-ingest/elastic-agent-ess-qa" +CI_ESS_STAGING_PATH="kv/ci-shared/platform-ingest/platform-ingest-ec-staging" CI_DRA_ROLE_PATH="kv/ci-shared/release/dra-role" @@ -54,7 +55,7 @@ if [[ "$BUILDKITE_PIPELINE_SLUG" == "elastic-agent" && "$BUILDKITE_STEP_KEY" == export TEST_INTEG_AUTH_GCP_SERVICE_TOKEN_FILE=$(realpath ./gcp.json) # ESS credentials - export API_KEY_TOKEN=$(vault kv get -field api_key ${CI_AGENT_QA_OBS_PATH}) + export API_KEY_TOKEN=$(vault kv get -field apiKey ${CI_ESS_STAGING_PATH}) echo ${API_KEY_TOKEN} > ./apiKey export TEST_INTEG_AUTH_ESS_APIKEY_FILE=$(realpath ./apiKey) fi diff --git a/.buildkite/scripts/steps/integration_tests.sh b/.buildkite/scripts/steps/integration_tests.sh index 9c469841e87..8b1dec76449 100755 --- a/.buildkite/scripts/steps/integration_tests.sh +++ b/.buildkite/scripts/steps/integration_tests.sh @@ -18,7 +18,7 @@ AGENT_PACKAGE_VERSION="${OVERRIDE_AGENT_PACKAGE_VERSION}" DEV=true EXTERNAL=true # Run integration tests set +e -AGENT_VERSION="${OVERRIDE_TEST_AGENT_VERSION}" 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_CLEAN_ON_EXIT=true SNAPSHOT=true mage integration:test TESTS_EXIT_STATUS=$? set -e diff --git a/magefile.go b/magefile.go index 06016bd48ff..183889b3e69 100644 --- a/magefile.go +++ b/magefile.go @@ -2094,8 +2094,8 @@ func authESS(ctx context.Context) error { fmt.Fprintln(os.Stderr, "❌ ESS authentication unsuccessful. Retrying...") - prompt := "Please provide a ESS (QA) API key. To get your API key, " + - "visit https://console.qa.cld.elstc.co/deployment-features/keys:" + prompt := fmt.Sprintf("Please provide a ESS API key for %s. To get your API key, "+ + "visit %s/deployment-features/keys:", client.BaseURL(), strings.TrimRight(client.BaseURL(), "/api/v1")) essAPIKey, err = stringPrompt(prompt) if err != nil { return fmt.Errorf("unable to read ESS API key from prompt: %w", err) diff --git a/pkg/testing/ess/client.go b/pkg/testing/ess/client.go index 42587c6f275..0b618ff586e 100644 --- a/pkg/testing/ess/client.go +++ b/pkg/testing/ess/client.go @@ -60,3 +60,7 @@ func (c *Client) doPost(ctx context.Context, relativeUrl, contentType string, bo return c.client.Do(req) } + +func (c *Client) BaseURL() string { + return c.config.BaseUrl +} diff --git a/pkg/testing/ess/config.go b/pkg/testing/ess/config.go index 89298dbd341..c90be94caa5 100644 --- a/pkg/testing/ess/config.go +++ b/pkg/testing/ess/config.go @@ -18,7 +18,7 @@ type Config struct { func defaultConfig() *Config { return &Config{ - BaseUrl: `https://console.qa.cld.elstc.co/api/v1`, + BaseUrl: `https://staging.found.no/api/v1`, } }