From a4fffb9842800663532279dac9939d6d1781ab35 Mon Sep 17 00:00:00 2001 From: Chris Earle Date: Fri, 13 Feb 2026 23:53:55 +0000 Subject: [PATCH 1/3] Bootstrap repository --- .buildkite/default-pipeline.yml | 14 ++++++++++++++ .buildkite/pipeline.yml | 29 +++++++++++++++++++++++++++++ .github/CODEOWNERS | 5 +++-- catalog-info.yaml | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 .buildkite/default-pipeline.yml create mode 100644 .buildkite/pipeline.yml create mode 100644 catalog-info.yaml diff --git a/.buildkite/default-pipeline.yml b/.buildkite/default-pipeline.yml new file mode 100644 index 00000000..477c4333 --- /dev/null +++ b/.buildkite/default-pipeline.yml @@ -0,0 +1,14 @@ +--- +# $yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json +steps: + - label: "Build" + command: "true" + + - label: "Test" + command: "true" + + - label: "Deploy" + command: "true" + + - label: "Publish" + command: "true" diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml new file mode 100644 index 00000000..53325d71 --- /dev/null +++ b/.buildkite/pipeline.yml @@ -0,0 +1,29 @@ +--- +# $yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json +steps: + + # if our Renovate configuration is amended, then make sure we have well-formed config + # for more info, see https://docs.elastic.dev/plat-prod-team/service-catalogue/renovate/testing-renovate-changes + - label: "Verify Renovate configuration" + command: "renovate-config-validator" + agents: + image: "docker.elastic.co/ci-agent-images/pipelib:0.25.0@sha256:1e7cbd9859c9d4d16471b99c4d734709340d7c584401a62b762ca1592c2e5df0" + if_changed: + - "renovate.json" + + # if our catalog-info.yaml is changed, make sure it's well-formed according to our internal standards as well as Backstage's validation + - label: Validate TokenPolicy RREs + command: "/agent/check-catalog-info.sh" + agents: + image: "docker.elastic.co/ci-agent-images/pipelib:0.25.0@sha256:1e7cbd9859c9d4d16471b99c4d734709340d7c584401a62b762ca1592c2e5df0" + if_changed: + - "catalog-info.yaml" + + - label: ":pipeline: Upload default Pipeline" + command: "buildkite-agent pipeline upload .buildkite/default-pipeline.yml" + if_changed: + include: + - "**/*" + exclude: + - "catalog-info.yaml" + - "renovate.json" diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 66048aba..03b13f77 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,2 +1,3 @@ -# used for branch protection -* @pickypg +# These owners will be the default owners for everything in +# the repo. +* @elastic/opex diff --git a/catalog-info.yaml b/catalog-info.yaml new file mode 100644 index 00000000..1df5a81c --- /dev/null +++ b/catalog-info.yaml @@ -0,0 +1,32 @@ +# Declare your Buildkite pipelines below +--- +# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json +apiVersion: backstage.io/v1alpha1 +kind: Resource +metadata: + name: buildkite-pipeline-support-diagnostics + description: Buildkite Pipeline for support-diagnostics + links: + - title: Pipeline + url: https://buildkite.com/elastic/support-diagnostics + +spec: + type: buildkite-pipeline + owner: group:opex + system: buildkite + implementation: + apiVersion: buildkite.elastic.dev/v1 + kind: Pipeline + metadata: + name: support-diagnostics + description: + spec: + repository: elastic/support-diagnostics + pipeline_file: ".buildkite/pipeline.yml" + provider_settings: + build_pull_request_forks: true + teams: + opex: + access_level: MANAGE_BUILD_AND_READ + everyone: + access_level: READ_ONLY From 2daed29a7003bc082f3e3489c94ac2a8e73ccdc6 Mon Sep 17 00:00:00 2001 From: Chris Earle Date: Fri, 13 Feb 2026 17:07:02 -0700 Subject: [PATCH 2/3] Add @pickypg as a code owner --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 03b13f77..22cb5a83 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,3 +1,3 @@ # These owners will be the default owners for everything in # the repo. -* @elastic/opex +* @elastic/opex @pickypg From 898abfeb61f70fa822849a1a93848feb24a5b3ac Mon Sep 17 00:00:00 2001 From: Chris Earle Date: Fri, 13 Feb 2026 17:07:45 -0700 Subject: [PATCH 3/3] Add Docker build and push step to pipeline --- .buildkite/default-pipeline.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.buildkite/default-pipeline.yml b/.buildkite/default-pipeline.yml index 477c4333..05048f31 100644 --- a/.buildkite/default-pipeline.yml +++ b/.buildkite/default-pipeline.yml @@ -1,8 +1,15 @@ --- # $yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json steps: - - label: "Build" - command: "true" + - label: ":docker: Build and Push Dockerfile" + commands: + - "vault kv get -field=password kv/ci-shared/opex/oci-registry-creds-prod | docker login -u $(vault kv get -field=username kv/ci-shared/opex/oci-registry-creds-prod) --password-stdin docker.elastic.co" + - "docker buildx create --use" + - "docker buildx build --platform linux/amd64,linux/arm64 --push -t docker.elastic.co/opex/diagnostics:latest ." + agents: + provider: "gcp" + imagePrefix: "core-ubuntu-2204" + machineType: "n2-standard-2" - label: "Test" command: "true"