Skip to content

buildkite(oidc): access google secrets for the ECH #2612

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .buildkite/hooks/pre-command
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export SERVERLESS=${SERVERLESS:-"false"}
WORKSPACE=$(pwd)
export WORKSPACE

EC_TOKEN_PATH=kv/ci-shared/platform-ingest/platform-ingest-ec-qa
EC_DATA_PATH=secret/ci/elastic-elastic-package/ec_data

# variables required for Terraform
Expand Down Expand Up @@ -88,10 +87,6 @@ fi

if [[ "${BUILDKITE_PIPELINE_SLUG}" == "elastic-package-test-serverless" ]]; then
if [[ "${BUILDKITE_STEP_KEY}" == "test-serverless" ]]; then
EC_API_KEY_SECRET=$(retry 5 vault kv get -field apiKey "${EC_TOKEN_PATH}")
export EC_API_KEY_SECRET
EC_HOST_SECRET=$(retry 5 vault kv get -field url "${EC_TOKEN_PATH}")
export EC_HOST_SECRET
EC_REGION_SECRET=$(retry 5 vault read -field region_qa "${EC_DATA_PATH}")
export EC_REGION_SECRET

Expand Down
2 changes: 1 addition & 1 deletion .buildkite/hooks/pre-exit
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if [[ "${BUILDKITE_PIPELINE_SLUG}" == "elastic-package-test-serverless" && "${BU
# BUILDKITE resets PATH contents in pre-exit hook, but elastic-package
# is already installed in the test_serverless pipeline step, accessing
# directly to the binary
EC_API_KEY="${EC_API_KEY_SECRET}" EC_HOST="${EC_HOST_SECRET}" "${HOME}"/go/bin/elastic-package stack down -v
"${HOME}"/go/bin/elastic-package stack down -v
fi

echo "--- Cleanup"
Expand Down
4 changes: 4 additions & 0 deletions .buildkite/pipeline.serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ steps:
lifetime: 10800 # seconds
project-id: "elastic-observability-ci"
project-number: "911195782929"
- avaly/gcp-secret-manager#v1.2.0:
env:
EC_API_KEY: elastic-cloud-observability-team-qa-api-key
EC_HOST: elastic-cloud-observability-team-qa-endpoint
artifact_paths:
- build/test-results/*.xml
- build/test-coverage/coverage-*.xml
Expand Down
3 changes: 0 additions & 3 deletions .buildkite/scripts/tooling.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ prepare_serverless_stack() {
fi
create_elastic_package_profile "${profile_name}"

export EC_API_KEY=${EC_API_KEY_SECRET}
export EC_HOST=${EC_HOST_SECRET}

echo "Boot up the Elastic stack"
# Currently, if STACK_VERSION is not defined, for serverless it will be
# used as Elastic stack version (for agents) the default version in elastic-package
Expand Down