Skip to content

Commit 7e15a13

Browse files
committed
feat(oidc): for using EC credentials
1 parent 1ad4716 commit 7e15a13

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

.buildkite/hooks/pre-command

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

3434
BUILDKITE_API_TOKEN_PATH=kv/ci-shared/platform-ingest/buildkite_token
3535

36-
EC_TOKEN_PATH=kv/ci-shared/platform-ingest/platform-ingest-ec-qa
3736
EC_DATA_PATH=secret/ci/elastic-integrations/ec_data
3837

3938
# variables required for terraform
@@ -117,10 +116,6 @@ if [[ "${BUILDKITE_PIPELINE_SLUG}" == "integrations-serverless" ]]; then
117116
BUILDKITE_API_TOKEN=$(retry 5 vault kv get -field buildkite_token "${BUILDKITE_API_TOKEN_PATH}")
118117
export BUILDKITE_API_TOKEN
119118

120-
EC_API_KEY_SECRET=$(retry 5 vault kv get -field apiKey "${EC_TOKEN_PATH}")
121-
export EC_API_KEY_SECRET
122-
EC_HOST_SECRET=$(retry 5 vault kv get -field url "${EC_TOKEN_PATH}")
123-
export EC_HOST_SECRET
124119
EC_REGION_SECRET=$(retry 5 vault read -field region_qa "${EC_DATA_PATH}")
125120
export EC_REGION_SECRET
126121
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: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +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 the default Google Cloud using the OIDC token to fetch
77+
# the google secrets.
78+
- elastic/oblt-google-auth#v1.3.0:
79+
lifetime: 10800 # seconds
80+
- avaly/gcp-secret-manager#v1.2.0:
81+
env:
82+
EC_API_KEY: elastic-cloud-observability-team-qa-api-key
83+
EC_HOST: elastic-cloud-observability-team-qa-endpoint
84+
# See https://github.com/elastic/oblt-infra/blob/main/conf/resources/repos/integrations/01-gcp-buildkite-oidc.tf
85+
# This plugin authenticates to CI Google Cloud using the OIDC token.
7786
- elastic/oblt-google-auth#v1.3.0:
7887
lifetime: 10800 # seconds
7988
project-id: "elastic-observability-ci"

.buildkite/scripts/common.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -540,9 +540,6 @@ prepare_serverless_stack() {
540540
fi
541541
create_elastic_package_profile "${profile_name}"
542542

543-
export EC_API_KEY=${EC_API_KEY_SECRET}
544-
export EC_HOST=${EC_HOST_SECRET}
545-
546543
echo "Boot up the Elastic stack"
547544
# grep command required to remove password from the output
548545
if ! ${ELASTIC_PACKAGE_BIN} stack up \

0 commit comments

Comments
 (0)