Skip to content

Commit aed625f

Browse files
committed
use bk plugin instead of the pre-command
1 parent 8bb926c commit aed625f

File tree

3 files changed

+21
-7
lines changed

3 files changed

+21
-7
lines changed

.buildkite/bk.integration-fips.pipeline.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ common:
2020
- oblt_cli_plugin: &oblt_cli_plugin
2121
elastic/oblt-cli#v0.2.0:
2222
version-file: .oblt-cli-version
23+
- vault_github_token: &vault_github_token
24+
elastic/vault-github-token#v0.1.0:
2325

2426
steps:
2527
- label: Build and push custom elastic-agent image
@@ -95,6 +97,7 @@ steps:
9597
plugins:
9698
- *google_oidc_observability_plugin
9799
- *oblt_cli_plugin
100+
- *vault_github_token
98101

99102
- label: "fips:arm64:sudo-{{matrix.sudo}}:{{matrix.groups}}"
100103
depends_on:
@@ -128,6 +131,7 @@ steps:
128131
plugins:
129132
- *google_oidc_observability_plugin
130133
- *oblt_cli_plugin
134+
- *vault_github_token
131135

132136
- label: ESS FIPS stack cleanup
133137
depends_on:

.buildkite/bk.integration.pipeline.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ common:
4646
- oblt_cli_plugin: &oblt_cli_plugin
4747
elastic/oblt-cli#v0.2.0:
4848
version-file: .oblt-cli-version
49+
- vault_github_token: &vault_github_token
50+
elastic/vault-github-token#v0.1.0:
4951

5052
steps:
5153
- label: Start ESS stack for integration tests using oblt-cli
@@ -88,6 +90,7 @@ steps:
8890
plugins:
8991
- *google_oidc_observability_plugin
9092
- *oblt_cli_plugin
93+
- *vault_github_token
9194

9295
- label: "Windows:2025:amd64:sudo"
9396
depends_on:
@@ -110,6 +113,7 @@ steps:
110113
plugins:
111114
- *google_oidc_observability_plugin
112115
- *oblt_cli_plugin
116+
- *vault_github_token
113117

114118
- label: "Ubuntu:2404:amd64:sudo"
115119
depends_on: packaging-ubuntu-x86-64
@@ -131,6 +135,7 @@ steps:
131135
plugins:
132136
- *google_oidc_observability_plugin
133137
- *oblt_cli_plugin
138+
- *vault_github_token
134139

135140
- group: "Stateful: Windows"
136141
key: integration-tests-win
@@ -170,6 +175,7 @@ steps:
170175
plugins:
171176
- *google_oidc_observability_plugin
172177
- *oblt_cli_plugin
178+
- *vault_github_token
173179

174180
- label: "Win2022:non-sudo:{{matrix}}"
175181
depends_on:
@@ -194,6 +200,7 @@ steps:
194200
plugins:
195201
- *google_oidc_observability_plugin
196202
- *oblt_cli_plugin
203+
- *vault_github_token
197204

198205
- label: "Win2025:sudo:{{matrix}}"
199206
depends_on:
@@ -225,6 +232,7 @@ steps:
225232
plugins:
226233
- *google_oidc_observability_plugin
227234
- *oblt_cli_plugin
235+
- *vault_github_token
228236

229237
- label: "Win2025:non-sudo:{{matrix}}"
230238
depends_on:
@@ -249,6 +257,7 @@ steps:
249257
plugins:
250258
- *google_oidc_observability_plugin
251259
- *oblt_cli_plugin
260+
- *vault_github_token
252261

253262
- group: "Stateful:Ubuntu"
254263
key: integration-tests-ubuntu
@@ -280,6 +289,7 @@ steps:
280289
plugins:
281290
- *google_oidc_observability_plugin
282291
- *oblt_cli_plugin
292+
- *vault_github_token
283293

284294
- label: "x86_64:sudo: {{matrix}}"
285295
depends_on:
@@ -318,6 +328,7 @@ steps:
318328
plugins:
319329
- *google_oidc_observability_plugin
320330
- *oblt_cli_plugin
331+
- *vault_github_token
321332

322333
- label: "arm:sudo: {{matrix}}"
323334
depends_on:
@@ -356,6 +367,7 @@ steps:
356367
plugins:
357368
- *google_oidc_observability_plugin
358369
- *oblt_cli_plugin
370+
- *vault_github_token
359371

360372
- label: "arm:non-sudo: {{matrix}}"
361373
skip: true
@@ -381,6 +393,7 @@ steps:
381393
plugins:
382394
- *google_oidc_observability_plugin
383395
- *oblt_cli_plugin
396+
- *vault_github_token
384397

385398
- group: "Stateful:Debian"
386399
key: integration-tests-debian
@@ -412,6 +425,7 @@ steps:
412425
plugins:
413426
- *google_oidc_observability_plugin
414427
- *oblt_cli_plugin
428+
- *vault_github_token
415429

416430
- label: "x86_64:sudo: {{matrix}}"
417431
depends_on:
@@ -451,6 +465,7 @@ steps:
451465
plugins:
452466
- *google_oidc_observability_plugin
453467
- *oblt_cli_plugin
468+
- *vault_github_token
454469

455470
- group: "Stateful(Sudo):RHEL8"
456471
key: integration-tests-rhel8
@@ -481,6 +496,7 @@ steps:
481496
plugins:
482497
- *google_oidc_observability_plugin
483498
- *oblt_cli_plugin
499+
- *vault_github_token
484500

485501
- group: "Kubernetes"
486502
key: integration-tests-kubernetes
@@ -532,6 +548,7 @@ steps:
532548
plugins:
533549
- *google_oidc_observability_plugin
534550
- *oblt_cli_plugin
551+
- *vault_github_token
535552

536553
- group: "Serverless integration test"
537554
key: integration-tests-serverless

.buildkite/hooks/pre-command

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,6 @@ CI_GCP_OBS_PATH="kv/ci-shared/observability-ingest/cloud/gcp"
1818
CI_ESS_PATH="kv/ci-shared/platform-ingest/platform-ingest-ec-prod"
1919
CI_DRA_ROLE_PATH="kv/ci-shared/release/dra-role"
2020

21-
# NOTE: oblt-cli requires the GITHUB_TOKEN to be set in the environment
22-
# unfortunatelym, we cannot use the BK pipeline itself as it will
23-
# print the content, so we need to set it in the pre-command hook.
24-
# I decided to set it here for all the steps regardless to avoid
25-
# complicated logic in the pre-command hook.
26-
export GITHUB_TOKEN=$VAULT_GITHUB_TOKEN
27-
2821
function release_manager_login {
2922
DRA_CREDS_SECRET=$(retry 5 vault kv get -field=data -format=json ${CI_DRA_ROLE_PATH})
3023
VAULT_ADDR_SECRET=$(echo ${DRA_CREDS_SECRET} | jq -r '.vault_addr')

0 commit comments

Comments
 (0)