22
33env :
44 DOCKER_COMPOSE_VERSION : " 1.25.5"
5- DOCKER_REGISTRY : " docker.elastic.co"
6- DOCKER_IMAGE : " ${DOCKER_REGISTRY}/observability-ci/fleet-server" # needs to rename for rollback
7- DOCKER_IMAGE_SHA_TAG : " git-${BUILDKITE_COMMIT:0:12}" # needs to rename for rollback, should be "git-${BUILDKITE_COMMIT:0:12}"
8- DOCKER_IMAGE_LATEST_TAG : " latest" # needs to rename for rollback
9- DOCKER_IMAGE_GIT_TAG : " ${BUILDKITE_BRANCH}" # needs to rename for rollback
10- GO_AGENT_IMAGE : " golang:${GO_VERSION}"
115 TERRAFORM_VERSION : " 1.6.4"
126 IMAGE_UBUNTU_X86_64 : " family/core-ubuntu-2204"
137 IMAGE_UBUNTU_ARM_64 : " core-ubuntu-2204-aarch64"
148
159# This section is used to define the plugins that will be used in the pipeline.
1610# See https://buildkite.com/docs/pipelines/integrations/plugins/using#using-yaml-anchors-with-plugins
1711common :
12+ - test_collector_plugin : &test_collector_plugin
13+ test-collector#v1.11.0:
14+ files : " build/test-*.xml"
15+ format : " junit"
16+ branches : " main"
17+ debug : true
18+ - bk_analytics_token_plugin : &bk_analytics_token_plugin
19+ elastic/vault-secrets#v0.1.0:
20+ path : " kv/ci-shared/platform-ingest/buildkite_analytics_token"
21+ field : " token"
22+ env_var : " BUILDKITE_ANALYTICS_TOKEN"
23+ - docker_elastic_login_plugin : &docker_elastic_login_plugin
24+ elastic/vault-docker-login#v0.6.0:
25+ secret_path : ' kv/ci-shared/platform-ingest/elastic_docker_registry'
1826 # See https://github.com/elastic/oblt-infra/blob/main/conf/resources/repos/fleet-server/01-gcp-buildkite-oidc.tf
1927 # This plugin authenticates to Google Cloud using the OIDC token.
2028 - oidc_plugin : &oidc_plugin
@@ -29,11 +37,9 @@ steps:
2937 steps :
3038 - label : " :white_check_mark: Run check-ci"
3139 key : check-ci
32- command : " make check-ci "
40+ command : " .buildkite/scripts/check_ci.sh "
3341 agents :
34- image : " ${GO_AGENT_IMAGE}"
35- cpu : " 8"
36- memory : " 4G"
42+ provider : " gcp"
3743
3844 - label : " Package x86_64"
3945 key : " package-x86-64-pr"
6975 - label : " Run go benchmark for PR branch"
7076 key : " go-benchmark-pr"
7177 command : " .buildkite/scripts/run_benchmark.sh pr"
78+ env :
79+ BENCHMARK_ARGS : " -count=8 -benchmem"
7280 artifact_paths :
7381 - build/next.out
7482 - build/next.stat
@@ -78,7 +86,10 @@ steps:
7886
7987 - label : " Run go benchmark for ${BUILDKITE_PULL_REQUEST_BASE_BRANCH}"
8088 key : " go-benchmark-base"
89+ skip : true # FIXME: Temporarily disabled until mage is on 9.0
8190 command : " .buildkite/scripts/run_benchmark.sh base"
91+ env :
92+ BENCHMARK_ARGS : " -count=8 -benchmem"
8293 artifact_paths :
8394 - build/base.out
8495 - build/base.stat
8798 machineType : " c2-standard-8"
8899
89100 - label : " Compare results"
101+ skip : true # FIXME: Temporarily disabled until mage is on main
90102 key : " go-benchmark-compare"
91103 command : " .buildkite/scripts/run_benchmark.sh compare"
92104 artifact_paths :
@@ -142,11 +154,8 @@ steps:
142154 artifact_paths :
143155 - build/*.xml
144156 plugins :
145- - test-collector#v1.10.2:
146- files : " build/test-*.xml"
147- format : " junit"
148- branches : " main"
149- debug : true
157+ - *bk_analytics_token_plugin
158+ - *test_collector_plugin
150159 retry :
151160 automatic :
152161 limit : 1
@@ -162,11 +171,8 @@ steps:
162171 - build/*.xml
163172 - build/e2e-coverage.out
164173 plugins :
165- - test-collector#v1.10.2:
166- files : " build/test-*.xml"
167- format : " junit"
168- branches : " main"
169- debug : true
174+ - *bk_analytics_token_plugin
175+ - *test_collector_plugin
170176
171177 - label : " :junit: Junit annotate"
172178 plugins :
@@ -203,9 +209,22 @@ steps:
203209
204210 - label : " :gcloud: Cloud e2e Test"
205211 key : " cloud-e2e-test"
212+ env :
213+ DOCKER_REGISTRY : " docker.elastic.co"
214+ DOCKER_IMAGE : " docker.elastic.co/beats-ci/elastic-agent-cloud-fleet"
215+ DOCKER_IMAGE_TAG : " pr-${BUILDKITE_PULL_REQUEST}-${BUILDKITE_COMMIT:0:12}"
216+ SNAPSHOT : " true"
217+ PLATFORMS : " linux/amd64"
218+ TF_VAR_pull_request : " ${BUILDKITE_PULL_REQUEST}"
206219 command : " .buildkite/scripts/cloud_e2e_test.sh"
207220 agents :
208221 provider : " gcp"
222+ plugins :
223+ - *docker_elastic_login_plugin
224+ - elastic/vault-secrets#v0.1.0:
225+ path : " kv/ci-shared/platform-ingest/platform-ingest-ec-prod"
226+ field : " apiKey"
227+ env_var : " EC_API_KEY"
209228 depends_on :
210229 - step : " unit-test"
211230 allow_failure : false
@@ -218,9 +237,16 @@ steps:
218237 - label : " :docker: Publish docker image"
219238 key : " publish"
220239 command : " .buildkite/scripts/build_push_docker_image.sh"
240+ env :
241+ DOCKER_IMAGE : " docker.elastic.co/observability-ci/fleet-server" # needs to rename for rollback
242+ DOCKER_IMAGE_SHA_TAG : " git-${BUILDKITE_COMMIT:0:12}" # needs to rename for rollback, should be "git-${BUILDKITE_COMMIT:0:12}"
243+ DOCKER_IMAGE_LATEST_TAG : " latest" # needs to rename for rollback
244+ DOCKER_IMAGE_GIT_TAG : " ${BUILDKITE_BRANCH}" # needs to rename for rollback
221245 if : " build.env('BUILDKITE_PULL_REQUEST') == 'false' && build.env('BUILDKITE_BRANCH') == 'main'"
222246 agents :
223247 provider : " gcp"
248+ plugins :
249+ - *docker_elastic_login_plugin
224250 depends_on :
225251 - step : " tests"
226252 allow_failure : false
0 commit comments