Skip to content

Commit 0a1cf18

Browse files
authored
fix(bk): serverless-beats-tests start failing after merging #10734 (#10906)
1 parent 994d63d commit 0a1cf18

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

.buildkite/hooks/pre-command

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,8 @@ if [[ "$BUILDKITE_PIPELINE_SLUG" == "elastic-agent-package" ]]; then
3434
fi
3535
fi
3636

37-
if [[ "$BUILDKITE_PIPELINE_SLUG" == "buildkite-elastic-agent-integration-matrix" ]]; then
38-
echo "Setting credentials"
39-
# Set GCP credentials
37+
if [[ ("$BUILDKITE_PIPELINE_SLUG" == "buildkite-elastic-agent-integration-matrix") || ("$BUILDKITE_PIPELINE_SLUG" == "beats-agent-serverless-tests") ]]; then
38+
echo "Setting GCP credentials"
4039
export GOOGLE_APPLICATION_GCP_SECRET=$(retry 5 vault kv get -format=json -field=data ${CI_GCP_OBS_PATH})
4140
echo "${GOOGLE_APPLICATION_GCP_SECRET}" > ./gcp.json
4241
export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ./gcp.json)

.buildkite/pipeline.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,25 @@ steps:
344344
commit: "${BUILDKITE_COMMIT}"
345345
branch: "${BUILDKITE_BRANCH}"
346346

347+
# Trigger for pull requests - Serverless Beats Tests
348+
# this should help detecting issues earlier in the development cycle
349+
- label: "Trigger Serverless Beats Tests"
350+
if: build.pull_request.id != null
351+
plugins:
352+
- monorepo-diff#v1.2.0:
353+
diff: "git diff --name-only origin/${GITHUB_PR_TARGET_BRANCH}...HEAD"
354+
interpolation: false
355+
watch:
356+
- path:
357+
- .buildkite/serverless.beats.tests.yml
358+
- .buildkite/scripts/steps/beats_tests.sh
359+
- .buildkite/hooks/pre-command
360+
config:
361+
trigger: "beats-agent-serverless-tests"
362+
build:
363+
commit: "${BUILDKITE_COMMIT}"
364+
branch: "${BUILDKITE_BRANCH}"
365+
347366
# wait for CI to be done
348367
- wait: ~
349368

0 commit comments

Comments
 (0)