From 86cf85effae255b6c280ed362a6c13526a14462f Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Tue, 13 Feb 2024 12:14:40 +0100 Subject: [PATCH] ci(e2e): prepare the browser email and password (#35) --- .github/workflows/e2e.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index fdc78a9..64021e8 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -22,8 +22,10 @@ concurrency: cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} env: - # keep_serverless-staging-oblt OR keep_serverless-qa-oblt + # (keep_serverless-staging-oblt, keep_serverless-qa-oblt or serverless-production-oblt) SERVERLESS_PROJECT: serverless-production-oblt + # (staging, qa or production) + VAULT_SECRET_SUFFIX: production # NOTE: if you add a new job and it's a mandatory check then # update e2e-docs.yml @@ -56,3 +58,14 @@ jobs: # TODO: run the e2e targeting the required endpoint. # those values can be found in https://github.com/elastic/apm-pipeline-library/tree/main/.github/actions/oblt-cli-cluster-credentials#outputs - run: curl -X GET "${ELASTICSEARCH_HOST}/_cat/indices?v" -u ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD} + + - name: Get the browser email and password from Vault + uses: hashicorp/vault-action@v2.8.0 + with: + url: ${{ secrets.VAULT_ADDR }} + roleId: ${{ secrets.VAULT_ROLE_ID }} + secretId: ${{ secrets.VAULT_SECRET_ID }} + method: approle + secrets: | + secret/observability-team/ci/elastic-cloud/observability-team-${{ env.VAULT_SECRET_SUFFIX }} username | E2E__BROWSEREMAIL + secret/observability-team/ci/elastic-cloud/observability-team-${{ env.VAULT_SECRET_SUFFIX }} password | E2E__BROWSERPASSWORD