Skip to content

Commit 378b796

Browse files
authored
added pre-commit to x-pack/agentbeat (elastic#40965)
1 parent 1e6364a commit 378b796

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.buildkite/x-pack/pipeline.xpack.agentbeat.yml

+23
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,30 @@ env:
33
GCP_HI_PERF_MACHINE_TYPE: "c2d-highcpu-16"
44
IMAGE_UBUNTU_X86_64: "family/platform-ingest-beats-ubuntu-2204"
55

6+
IMAGE_BEATS_WITH_HOOKS_LATEST: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-beats-ci-with-hooks:latest"
7+
68
steps:
9+
- group: "Check/Update"
10+
key: "x-pack-agentbeat-check-update"
11+
12+
steps:
13+
- label: "agentbeat: Run pre-commit"
14+
command: "pre-commit run --all-files"
15+
agents:
16+
image: "${IMAGE_BEATS_WITH_HOOKS_LATEST}"
17+
memory: "2Gi"
18+
useCustomGlobalHooks: true
19+
notify:
20+
- github_commit_status:
21+
context: "agentbeat: pre-commit"
22+
23+
- wait: ~
24+
# with PRs, we want to run mandatory tests only if check/update step succeed
25+
# for other cases, e.g. merge commits, we want to run mundatory test (and publish) independently of other tests
26+
# this allows building DRA artifacts even if there is flakiness in check/update step
27+
if: build.env("BUILDKITE_PULL_REQUEST") != "false"
28+
depends_on: "x-pack-agentbeat-check-update"
29+
730
- group: "Agentbeat tests"
831
key: "agentbeat-mandatory-tests"
932

0 commit comments

Comments
 (0)