Skip to content

Commit c6507b9

Browse files
authored
feat(oidc): for using EC credentials (#13926) (#14057)
1 parent cc675a0 commit c6507b9

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

.buildkite/hooks/pre-command

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ export REPO_BUILD_TAG
3131

3232
BUILDKITE_API_TOKEN_PATH=kv/ci-shared/platform-ingest/buildkite_token
3333

34-
EC_TOKEN_PATH=kv/ci-shared/platform-ingest/platform-ingest-ec-qa
3534
EC_DATA_PATH=secret/ci/elastic-integrations/ec_data
3635

3736
# variables required for terraform
@@ -115,10 +114,6 @@ if [[ "${BUILDKITE_PIPELINE_SLUG}" == "integrations-serverless" ]]; then
115114
BUILDKITE_API_TOKEN=$(retry 5 vault kv get -field buildkite_token "${BUILDKITE_API_TOKEN_PATH}")
116115
export BUILDKITE_API_TOKEN
117116

118-
EC_API_KEY_SECRET=$(retry 5 vault kv get -field apiKey "${EC_TOKEN_PATH}")
119-
export EC_API_KEY_SECRET
120-
EC_HOST_SECRET=$(retry 5 vault kv get -field url "${EC_TOKEN_PATH}")
121-
export EC_HOST_SECRET
122117
EC_REGION_SECRET=$(retry 5 vault read -field region_qa "${EC_DATA_PATH}")
123118
export EC_REGION_SECRET
124119
fi

.buildkite/hooks/pre-exit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ if [[ "$BUILDKITE_PIPELINE_SLUG" == "integrations-serverless" ]]; then
2828
# Ensure elastic stack is stopped
2929
if [ -f "${ELASTIC_PACKAGE_BIN}" ]; then
3030
echo "--- Take down the Elastic stack"
31-
EC_API_KEY=${EC_API_KEY_SECRET} EC_HOST=${EC_HOST_SECRET} ${ELASTIC_PACKAGE_BIN} stack down -v
31+
${ELASTIC_PACKAGE_BIN} stack down -v
3232
fi
3333
fi
3434
fi

.buildkite/pipeline.serverless.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,16 @@ steps:
7373
- elastic/oblt-aws-auth#v0.1.0:
7474
duration: 10800 # seconds
7575
# See https://github.com/elastic/oblt-infra/blob/main/conf/resources/repos/integrations/01-gcp-buildkite-oidc.tf
76-
# This plugin authenticates to Google Cloud using the OIDC token.
76+
# This plugin authenticates to CI Google Cloud using the OIDC token.
7777
- elastic/oblt-google-auth#v1.3.0:
7878
lifetime: 10800 # seconds
7979
project-id: "elastic-observability-ci"
8080
project-number: "911195782929"
81+
lifetime: 10800 # seconds
82+
- avaly/gcp-secret-manager#v1.2.0:
83+
env:
84+
EC_API_KEY: elastic-cloud-observability-team-qa-api-key
85+
EC_HOST: elastic-cloud-observability-team-qa-endpoint
8186
artifact_paths:
8287
- "build/test-results/*.xml"
8388
- "build/elastic-stack-dump/*/logs/*.log"

.buildkite/scripts/common.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -529,9 +529,6 @@ prepare_serverless_stack() {
529529
fi
530530
create_elastic_package_profile "${profile_name}"
531531

532-
export EC_API_KEY=${EC_API_KEY_SECRET}
533-
export EC_HOST=${EC_HOST_SECRET}
534-
535532
echo "Boot up the Elastic stack"
536533
# grep command required to remove password from the output
537534
if ! ${ELASTIC_PACKAGE_BIN} stack up \

0 commit comments

Comments
 (0)