From b2e2ecc36c5415d5f85d386233c963e05763a64d Mon Sep 17 00:00:00 2001 From: sharbuz <87968844+sharbuz@users.noreply.github.com> Date: Tue, 23 Jan 2024 16:00:12 +0200 Subject: [PATCH 1/2] libbeat and packetbeat buildkite pipelines init (#37669) * libbeat and packetbeat buildkite pipelines init * add blank pipelines * fix remarks --- .buildkite/libbeat/pipeline.libbeat.yml | 5 ++ .buildkite/packetbeat/pipeline.packetbeat.yml | 5 ++ .buildkite/pull-requests.json | 32 +++++++ catalog-info.yaml | 90 +++++++++++++++++++ 4 files changed, 132 insertions(+) create mode 100644 .buildkite/libbeat/pipeline.libbeat.yml create mode 100644 .buildkite/packetbeat/pipeline.packetbeat.yml diff --git a/.buildkite/libbeat/pipeline.libbeat.yml b/.buildkite/libbeat/pipeline.libbeat.yml new file mode 100644 index 000000000000..34321b61161b --- /dev/null +++ b/.buildkite/libbeat/pipeline.libbeat.yml @@ -0,0 +1,5 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json + +steps: + - label: "Example test" + command: echo "Hello!" diff --git a/.buildkite/packetbeat/pipeline.packetbeat.yml b/.buildkite/packetbeat/pipeline.packetbeat.yml new file mode 100644 index 000000000000..34321b61161b --- /dev/null +++ b/.buildkite/packetbeat/pipeline.packetbeat.yml @@ -0,0 +1,5 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json + +steps: + - label: "Example test" + command: echo "Hello!" diff --git a/.buildkite/pull-requests.json b/.buildkite/pull-requests.json index 43d8974f3bf6..cc8ff9ab7a52 100644 --- a/.buildkite/pull-requests.json +++ b/.buildkite/pull-requests.json @@ -95,6 +95,38 @@ "skip_target_branches": [ ], "skip_ci_on_only_changed": [ ], "always_require_ci_on_changed": [ "^deploy/kubernetes/.*", ".buildkite/deploy/kubernetes/.*", "^libbeat/docs/version.asciidoc"] + }, + { + "enabled": true, + "pipelineSlug": "beats-libbeat", + "allow_org_users": true, + "allowed_repo_permissions": ["admin", "write"], + "allowed_list": [ ], + "set_commit_status": true, + "build_on_commit": true, + "build_on_comment": true, + "trigger_comment_regex": "^/test libbeat$|^/test filebeat", + "always_trigger_comment_regex": "^/test libbeat$", + "skip_ci_labels": [ ], + "skip_target_branches": [ ], + "skip_ci_on_only_changed": [ ], + "always_require_ci_on_changed": ["^go.mod", "^pytest.ini", "^dev-tools/.*", "^libbeat/.*", "^testing/.*"] + }, + { + "enabled": true, + "pipelineSlug": "beats-packetbeat", + "allow_org_users": true, + "allowed_repo_permissions": ["admin", "write"], + "allowed_list": [ ], + "set_commit_status": true, + "build_on_commit": true, + "build_on_comment": true, + "trigger_comment_regex": "^/test packetbeat$", + "always_trigger_comment_regex": "^/test packetbeat$", + "skip_ci_labels": [ ], + "skip_target_branches": [ ], + "skip_ci_on_only_changed": [ ], + "always_require_ci_on_changed": ["^packetbeat/.*", ".buildkite/packetbeat/.*", "^go.mod", "^pytest.ini", "^dev-tools/.*", "^libbeat/.*", "^testing/.*"] } ] } diff --git a/catalog-info.yaml b/catalog-info.yaml index 92757fd4c134..77ad8d8ae03b 100644 --- a/catalog-info.yaml +++ b/catalog-info.yaml @@ -287,3 +287,93 @@ spec: access_level: MANAGE_BUILD_AND_READ everyone: access_level: READ_ONLY + +--- +# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/e57ee3bed7a6f73077a3f55a38e76e40ec87a7cf/rre.schema.json +apiVersion: backstage.io/v1alpha1 +kind: Resource +metadata: + name: buildkite-pipeline-beats-libbeat + description: "Beats libbeat pipeline" + links: + - title: Pipeline + url: https://buildkite.com/elastic/beats-libbeat + +spec: + type: buildkite-pipeline + owner: group:ingest-fp + system: buildkite + implementation: + apiVersion: buildkite.elastic.dev/v1 + kind: Pipeline + metadata: + name: beats-libbeat + description: "Beats libbeat pipeline" + spec: +# branch_configuration: "main 7.17 8.* v7.17 v8.*" TODO: temporarily commented to build PRs from forks + pipeline_file: ".buildkite/libbeat/pipeline.libbeat.yml" +# maximum_timeout_in_minutes: 120 TODO: uncomment when pipeline is ready + provider_settings: + build_pull_request_forks: false + build_pull_requests: true # requires filter_enabled and filter_condition settings as below when used with buildkite-pr-bot + build_tags: true + filter_enabled: true + filter_condition: >- + build.pull_request.id == null || (build.creator.name == 'elasticmachine' && build.pull_request.id != null) + repository: elastic/beats + cancel_intermediate_builds: true + cancel_intermediate_builds_branch_filter: "!main !7.17 !8.*" + skip_intermediate_builds: true + skip_intermediate_builds_branch_filter: "!main !7.17 !8.*" + # env: + # ELASTIC_PR_COMMENTS_ENABLED: "true" TODO: uncomment when pipeline is ready + teams: + ingest-fp: + access_level: MANAGE_BUILD_AND_READ + everyone: + access_level: READ_ONLY + +--- +# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/e57ee3bed7a6f73077a3f55a38e76e40ec87a7cf/rre.schema.json +apiVersion: backstage.io/v1alpha1 +kind: Resource +metadata: + name: buildkite-pipeline-beats-packetbeat + description: "Beats packetbeat pipeline" + links: + - title: Pipeline + url: https://buildkite.com/elastic/beats-libbeat + +spec: + type: buildkite-pipeline + owner: group:ingest-fp + system: buildkite + implementation: + apiVersion: buildkite.elastic.dev/v1 + kind: Pipeline + metadata: + name: beats-packetbeat + description: "Beats packetbeat pipeline" + spec: +# branch_configuration: "main 7.17 8.* v7.17 v8.*" TODO: temporarily commented to build PRs from forks + pipeline_file: ".buildkite/libbeat/pipeline.packetbeat.yml" +# maximum_timeout_in_minutes: 120 TODO: uncomment when pipeline is ready + provider_settings: + build_pull_request_forks: false + build_pull_requests: true # requires filter_enabled and filter_condition settings as below when used with buildkite-pr-bot + build_tags: true + filter_enabled: true + filter_condition: >- + build.pull_request.id == null || (build.creator.name == 'elasticmachine' && build.pull_request.id != null) + repository: elastic/beats + cancel_intermediate_builds: true + cancel_intermediate_builds_branch_filter: "!main !7.17 !8.*" + skip_intermediate_builds: true + skip_intermediate_builds_branch_filter: "!main !7.17 !8.*" + # env: + # ELASTIC_PR_COMMENTS_ENABLED: "true" TODO: uncomment when pipeline is ready + teams: + ingest-fp: + access_level: MANAGE_BUILD_AND_READ + everyone: + access_level: READ_ONLY From 6383c565ffb3ea90edeaedca1deeb818edd226a8 Mon Sep 17 00:00:00 2001 From: sharbuz <87968844+sharbuz@users.noreply.github.com> Date: Tue, 23 Jan 2024 17:45:27 +0200 Subject: [PATCH 2/2] fix the packetbeat bk pipeline init config (#37706) * fix libbeat bk pipeline init * fix packetbeat bk pipeline init --- catalog-info.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catalog-info.yaml b/catalog-info.yaml index 77ad8d8ae03b..4d6c956f1f3f 100644 --- a/catalog-info.yaml +++ b/catalog-info.yaml @@ -356,7 +356,7 @@ spec: description: "Beats packetbeat pipeline" spec: # branch_configuration: "main 7.17 8.* v7.17 v8.*" TODO: temporarily commented to build PRs from forks - pipeline_file: ".buildkite/libbeat/pipeline.packetbeat.yml" + pipeline_file: ".buildkite/packetbeat/pipeline.packetbeat.yml" # maximum_timeout_in_minutes: 120 TODO: uncomment when pipeline is ready provider_settings: build_pull_request_forks: false