Skip to content

Commit 0023563

Browse files
mergify[bot]v1v
andauthored
bk: use elastic/vault-secrets and test-collector plugins together (#8311) (#8361)
(cherry picked from commit 9206f0b) Co-authored-by: Victor Martinez <[email protected]>
1 parent 58b47b5 commit 0023563

File tree

4 files changed

+10
-20
lines changed

4 files changed

+10
-20
lines changed

.buildkite/bk.integration.pipeline.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,11 @@ steps:
441441
soft_fail:
442442
- exit_status: "*"
443443
plugins:
444-
- test-collector#v1.10.1:
444+
- elastic/vault-secrets#v0.1.0:
445+
path: "kv/ci-shared/platform-ingest/buildkite_analytics_token"
446+
field: "token"
447+
env_var: "BUILDKITE_ANALYTICS_TOKEN"
448+
- test-collector#v1.11.0:
445449
files: "build/*.xml"
446450
format: "junit"
447451
branches: "main"

.buildkite/hooks/pre-command

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,6 @@ if [[ "$BUILDKITE_STEP_KEY" == *"integration-tests"* ]]; then
5858
export API_KEY_TOKEN=$(vault kv get -field apiKey ${CI_ESS_PATH})
5959
echo ${API_KEY_TOKEN} > ./apiKey
6060
export TEST_INTEG_AUTH_ESS_APIKEY_FILE=$(realpath ./apiKey)
61-
62-
# BK analytics
63-
echo "--- Prepare BK test analytics token :vault:"
64-
BUILDKITE_ANALYTICS_TOKEN=$(vault kv get -field token kv/ci-shared/platform-ingest/buildkite_analytics_token)
65-
export BUILDKITE_ANALYTICS_TOKEN
66-
fi
67-
68-
if [[ "$BUILDKITE_STEP_KEY" == *"aggregate-reports"* ]]; then
69-
# BK analytics
70-
echo "--- Prepare BK test analytics token :vault:"
71-
BUILDKITE_ANALYTICS_TOKEN=$(vault kv get -field token kv/ci-shared/platform-ingest/buildkite_analytics_token)
72-
export BUILDKITE_ANALYTICS_TOKEN
7361
fi
7462

7563
if [[ "$BUILDKITE_PIPELINE_SLUG" == "elastic-agent-binary-dra" ]]; then

.buildkite/scripts/steps/integration_tests_tf.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,6 @@ else
5252
export KIBANA_PASSWORD=$(buildkite-agent meta-data get "kibana.pwd")
5353
fi
5454

55-
# TODO: move to common.sh when it's refactored
56-
# BK analytics
57-
echo "--- Prepare BK test analytics token :vault:"
58-
BUILDKITE_ANALYTICS_TOKEN=$(vault kv get -field token kv/ci-shared/platform-ingest/buildkite_analytics_token)
59-
export BUILDKITE_ANALYTICS_TOKEN
60-
6155
# Run integration tests
6256
echo "~~~ Running integration tests"
6357

docs/test-framework-dev-guide.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,11 @@ out weight the benefits of creating another group.
351351
machineType: "n1-standard-8"
352352
image: "family/platform-ingest-elastic-agent-ubuntu-2404"
353353
plugins:
354-
- test-collector#v1.10.1:
354+
- elastic/vault-secrets#v0.1.0:
355+
path: "kv/ci-shared/platform-ingest/buildkite_analytics_token"
356+
field: "token"
357+
env_var: "BUILDKITE_ANALYTICS_TOKEN"
358+
- test-collector#v1.11.0:
355359
files: "build/TEST-*.xml"
356360
format: "junit"
357361
branches: "main"

0 commit comments

Comments
 (0)