# Declare a Backstage Component that represents your application.
---
# yaml-language-server: $schema=https://json.schemastore.org/catalog-info.json
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
  name: beats
  description: ":tropical_fish: Beats - Lightweight shippers for Elasticsearch & Logstash"
  links:
    - title: Beats Documentation
      icon: file-doc
      url: https://www.elastic.co/products/beats

spec:
  type: library
  owner: group:ingest-fp
  system: platform-ingest
  lifecycle: production

---
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
  name: buildkite-pipeline-beats
  description: "Beats Main pipeline"
  links:
    - title: Pipeline
      url: https://buildkite.com/elastic/beats

spec:
  type: buildkite-pipeline
  owner: group:ingest-fp
  system: platform-ingest
  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      name: beats
      description: "Beats Main pipeline"
    spec:
      branch_configuration: "main 7.17 8.* 9.*"
      pipeline_file: ".buildkite/pipeline.yml"
      provider_settings:
        build_pull_request_forks: false
        build_pull_request_labels_changed: true # automatically re trigger build if GH labels change
        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.* !8.* !9.*"
      skip_intermediate_builds: true
      skip_intermediate_builds_branch_filter: "!main !7.* !8.* !9.*"
      env:
        # TODO set to true once https://github.com/elastic/ingest-dev/issues/3001 has been resolved
        ELASTIC_PR_COMMENTS_ENABLED: "false"
        ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true'
        SLACK_NOTIFICATIONS_CHANNEL: '#ingest-notifications'
        SLACK_NOTIFICATIONS_ON_SUCCESS: 'false'
        SLACK_NOTIFICATIONS_ALL_BRANCHES: "false"  # only notify for failures on `main` or \d+.\d+ (release) branches
      teams:
        ingest-fp:
          access_level: MANAGE_BUILD_AND_READ
        everyone:
          access_level: BUILD_AND_READ

---
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
  name: buildkite-pipeline-metricbeat
  description: "Beats: Metricbeat pipeline"
  links:
    - title: Pipeline
      url: https://buildkite.com/elastic/beats-metricbeat

spec:
  type: buildkite-pipeline
  owner: group:ingest-fp
  system: platform-ingest
  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      name: beats-metricbeat
      description: "Beats Metricbeat pipeline"
    spec:
      branch_configuration: "main 7.17 8.* 9.*"
      pipeline_file: ".buildkite/metricbeat/pipeline.yml"
      maximum_timeout_in_minutes: 120
      provider_settings:
        trigger_mode: none # don't trigger jobs from github activity
        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.* !8.* !9.*"
      skip_intermediate_builds: true
      skip_intermediate_builds_branch_filter: "!main !7.* !8.* !9.*"
      env:
        # TODO set to truue once https://github.com/elastic/ingest-dev/issues/3001 has been resolved
        ELASTIC_PR_COMMENTS_ENABLED: "false"
      teams:
        ingest-fp:
          access_level: MANAGE_BUILD_AND_READ
        everyone:
          access_level: BUILD_AND_READ

---
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
  name: buildkite-pipeline-filebeat
  description: "Filebeat pipeline"
  links:
    - title: Pipeline
      url: https://buildkite.com/elastic/filebeat

spec:
  type: buildkite-pipeline
  owner: group:ingest-fp
  system: platform-ingest
  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      name: filebeat
      description: "Filebeat pipeline"
    spec:
      branch_configuration: "main 7.17 8.* 9.*"
      pipeline_file: ".buildkite/filebeat/filebeat-pipeline.yml"
      maximum_timeout_in_minutes: 120
      provider_settings:
        trigger_mode: none # don't trigger jobs from github activity
        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.* !8.* !9.*"
      skip_intermediate_builds: true
      skip_intermediate_builds_branch_filter: "!main !7.* !8.* !9.*"
      env:
        # TODO set to truue once https://github.com/elastic/ingest-dev/issues/3001 has been resolved
        ELASTIC_PR_COMMENTS_ENABLED: "false"
      teams:
        ingest-fp:
          access_level: MANAGE_BUILD_AND_READ
        everyone:
          access_level: BUILD_AND_READ

---
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
  name: buildkite-pipeline-auditbeat
  description: "Auditbeat pipeline"
  links:
    - title: Pipeline
      url: https://buildkite.com/elastic/auditbeat

spec:
  type: buildkite-pipeline
  owner: group:ingest-fp
  system: platform-ingest
  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      name: auditbeat
      description: "Auditbeat pipeline"
    spec:
      #      branch_configuration: "main 7.17 8.*" TODO: temporarily commented to build PRs from forks
      pipeline_file: ".buildkite/auditbeat/auditbeat-pipeline.yml"
      #      maximum_timeout_in_minutes: 120 TODO: uncomment when pipeline is ready
      provider_settings:
        trigger_mode: none # don't trigger jobs from github activity
        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.* !8.* !9.*"
      skip_intermediate_builds: true
      skip_intermediate_builds_branch_filter: "!main !7.* !8.* !9.*"
      env:
        # TODO set to true once https://github.com/elastic/ingest-dev/issues/3001 has been resolved
        ELASTIC_PR_COMMENTS_ENABLED: "false"
      teams:
        ingest-fp:
          access_level: MANAGE_BUILD_AND_READ
        everyone:
          access_level: BUILD_AND_READ

---
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
  name: buildkite-pipeline-heartbeat
  description: "Heartbeat pipeline"
  links:
    - title: Pipeline
      url: https://buildkite.com/elastic/heartbeat

spec:
  type: buildkite-pipeline
  owner: group:ingest-fp
  system: platform-ingest
  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      name: heartbeat
      description: "Heartbeat pipeline"
    spec:
      branch_configuration: "main 7.17 8.* 9.*"
      pipeline_file: ".buildkite/heartbeat/heartbeat-pipeline.yml"
      maximum_timeout_in_minutes: 120
      provider_settings:
        trigger_mode: none # don't trigger jobs from github activity
        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.* !8.* !9.*"
      skip_intermediate_builds: true
      skip_intermediate_builds_branch_filter: "!main !7.* !8.* !9.*"
      env:
        # TODO set to true once https://github.com/elastic/ingest-dev/issues/3001 has been resolved
        ELASTIC_PR_COMMENTS_ENABLED: "false"
      teams:
        ingest-fp:
          access_level: MANAGE_BUILD_AND_READ
        everyone:
          access_level: BUILD_AND_READ

---
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
  name: buildkite-pipeline-deploy-k8s
  description: "Deploy K8S pipeline"
  links:
    - title: Pipeline
      url: https://buildkite.com/elastic/deploy-k8s

spec:
  type: buildkite-pipeline
  owner: group:ingest-fp
  system: platform-ingest
  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      name: deploy-k8s
      description: "Deploy K8S pipeline"
    spec:
      #      branch_configuration: "main 7.17 8.*" TODO: temporarily commented to build PRs from forks
      pipeline_file: ".buildkite/deploy/kubernetes/deploy-k8s-pipeline.yml"
      #      maximum_timeout_in_minutes: 120 TODO: uncomment when pipeline is ready
      provider_settings:
        trigger_mode: none # don't trigger jobs from github activity
        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.* !8.* !9.*"
      skip_intermediate_builds: true
      skip_intermediate_builds_branch_filter: "!main !7.* !8.* !9.*"
      env:
        # TODO set to true once https://github.com/elastic/ingest-dev/issues/3001 has been resolved
        ELASTIC_PR_COMMENTS_ENABLED: "false"
      teams:
        ingest-fp:
          access_level: MANAGE_BUILD_AND_READ
        everyone:
          access_level: BUILD_AND_READ

---
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/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: platform-ingest
  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      name: beats-libbeat
      description: "Beats libbeat pipeline"
    spec:
      branch_configuration: "main 7.17 8.* 9.*"
      pipeline_file: ".buildkite/libbeat/pipeline.libbeat.yml"
      maximum_timeout_in_minutes: 120
      provider_settings:
        trigger_mode: none # don't trigger jobs from github activity
        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.* !9.*"
      skip_intermediate_builds: true
      skip_intermediate_builds_branch_filter: "!main !7.17 !8.* !9.*"
      env:
        # TODO set to true once https://github.com/elastic/ingest-dev/issues/3001 has been resolved
        ELASTIC_PR_COMMENTS_ENABLED: "false"
      teams:
        ingest-fp:
          access_level: MANAGE_BUILD_AND_READ
        everyone:
          access_level: BUILD_AND_READ

---
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/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: platform-ingest
  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      name: beats-packetbeat
      description: "Beats packetbeat pipeline"
    spec:
      branch_configuration: "main 7.17 8.* 9.*"
      pipeline_file: ".buildkite/packetbeat/pipeline.packetbeat.yml"
      maximum_timeout_in_minutes: 120
      provider_settings:
        trigger_mode: none # don't trigger jobs from github activity
        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.* !9.*"
      skip_intermediate_builds: true
      skip_intermediate_builds_branch_filter: "!main !7.17 !8.* !9.*"
      env:
        # TODO set to true once https://github.com/elastic/ingest-dev/issues/3001 has been resolved
        ELASTIC_PR_COMMENTS_ENABLED: "false"
      teams:
        ingest-fp:
          access_level: MANAGE_BUILD_AND_READ
        everyone:
          access_level: BUILD_AND_READ

---
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
  name: buildkite-pipeline-beats-xpack-elastic-agent
  description: "Beats xpack elastic agent"
  links:
    - title: Pipeline
      url: https://buildkite.com/elastic/beats-xpack-elastic-agent

spec:
  type: buildkite-pipeline
  owner: group:ingest-fp
  system: platform-ingest
  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      name: beats-xpack-elastic-agent
      description: "Beats xpack elastic agent pipeline"
    spec:
      branch_configuration: "7.17"
      pipeline_file: ".buildkite/x-pack/elastic-agent/pipeline.xpack.elastic-agent.yml"
      provider_settings:
        trigger_mode: none # don't trigger jobs from github activity
        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.* !9.*"
      skip_intermediate_builds: true
      skip_intermediate_builds_branch_filter: "!main !7.17 !8.* !9.*"
      env:
        # TODO set to true once https://github.com/elastic/ingest-dev/issues/3001 has been resolved
        ELASTIC_PR_COMMENTS_ENABLED: "false"
      teams:
        ingest-fp:
          access_level: MANAGE_BUILD_AND_READ
        everyone:
          access_level: BUILD_AND_READ

---
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
  name: buildkite-pipeline-beats-winlogbeat
  description: "Beats winlogbeat pipeline"
  links:
    - title: Pipeline
      url: https://buildkite.com/elastic/beats-winlogbeat

spec:
  type: buildkite-pipeline
  owner: group:ingest-fp
  system: platform-ingest
  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      name: beats-winlogbeat
      description: "Beats winlogbeat pipeline"
    spec:
      branch_configuration: "main 7.17 8.* 9.*"
      pipeline_file: ".buildkite/winlogbeat/pipeline.winlogbeat.yml"
      maximum_timeout_in_minutes: 120
      provider_settings:
        trigger_mode: none # don't trigger jobs from github activity
        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.* !9.*"
      skip_intermediate_builds: true
      skip_intermediate_builds_branch_filter: "!main !7.17 !8.* !9.*"
      env:
        # TODO set to true once https://github.com/elastic/ingest-dev/issues/3001 has been resolved
        ELASTIC_PR_COMMENTS_ENABLED: "false"
      teams:
        ingest-fp:
          access_level: MANAGE_BUILD_AND_READ
        everyone:
          access_level: BUILD_AND_READ

---
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
  name: buildkite-pipeline-beats-xpack-winlogbeat
  description: "Beats x-pack winlogbeat pipeline"
  links:
    - title: Pipeline
      url: https://buildkite.com/elastic/beats-xpack-winlogbeat

spec:
  type: buildkite-pipeline
  owner: group:ingest-fp
  system: platform-ingest
  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      name: beats-xpack-winlogbeat
      description: "Beats x-pack winlogbeat pipeline"
    spec:
      branch_configuration: "main 7.17 8.* 9.*"
      pipeline_file: ".buildkite/x-pack/pipeline.xpack.winlogbeat.yml"
      maximum_timeout_in_minutes: 120
      provider_settings:
        trigger_mode: none # don't trigger jobs from github activity
        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.* !9.*"
      skip_intermediate_builds: true
      skip_intermediate_builds_branch_filter: "!main !7.17 !8.* !9.*"
      env:
        # TODO set to true once https://github.com/elastic/ingest-dev/issues/3001 has been resolved
        ELASTIC_PR_COMMENTS_ENABLED: "false"
      teams:
        ingest-fp:
          access_level: MANAGE_BUILD_AND_READ
        everyone:
          access_level: BUILD_AND_READ

---
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
  name: buildkite-pipeline-beats-xpack-packetbeat
  description: "Beats x-pack packetbeat pipeline"
  links:
    - title: Pipeline
      url: https://buildkite.com/elastic/beats-xpack-packetbeat

spec:
  type: buildkite-pipeline
  owner: group:ingest-fp
  system: platform-ingest
  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      name: beats-xpack-packetbeat
      description: "Beats x-pack packetbeat pipeline"
    spec:
      branch_configuration: "main 7.17 8.* 9.*"
      pipeline_file: ".buildkite/x-pack/pipeline.xpack.packetbeat.yml"
      maximum_timeout_in_minutes: 120
      provider_settings:
        trigger_mode: none # don't trigger jobs from github activity
        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.* !9.*"
      skip_intermediate_builds: true
      skip_intermediate_builds_branch_filter: "!main !7.17 !8.* !9.*"
      env:
        # TODO set to true once https://github.com/elastic/ingest-dev/issues/3001 has been resolved
        ELASTIC_PR_COMMENTS_ENABLED: "false"
      teams:
        ingest-fp:
          access_level: MANAGE_BUILD_AND_READ
        everyone:
          access_level: BUILD_AND_READ

---
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
  name: buildkite-pipeline-beats-xpack-libbeat
  description: "Beats x-pack libbeat pipeline"
  links:
    - title: Pipeline
      url: https://buildkite.com/elastic/beats-xpack-libbeat

spec:
  type: buildkite-pipeline
  owner: group:ingest-fp
  system: platform-ingest
  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      name: beats-xpack-libbeat
      description: "Beats x-pack libbeat pipeline"
    spec:
      branch_configuration: "main 7.17 8.* 9.*"
      pipeline_file: ".buildkite/x-pack/pipeline.xpack.libbeat.yml"
      maximum_timeout_in_minutes: 120
      provider_settings:
        trigger_mode: none # don't trigger jobs from github activity
        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.* !9.*"
      skip_intermediate_builds: true
      skip_intermediate_builds_branch_filter: "!main !7.17 !8.* !9.*"
      env:
        # TODO set to true once https://github.com/elastic/ingest-dev/issues/3001 has been resolved
        ELASTIC_PR_COMMENTS_ENABLED: "false"
      teams:
        ingest-fp:
          access_level: MANAGE_BUILD_AND_READ
        everyone:
          access_level: BUILD_AND_READ

---
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
  name: buildkite-pipeline-beats-xpack-metricbeat
  description: "Beats x-pack metricbeat pipeline"
  links:
    - title: Pipeline
      url: https://buildkite.com/elastic/beats-xpack-metricbeat

spec:
  type: buildkite-pipeline
  owner: group:ingest-fp
  system: platform-ingest
  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      name: beats-xpack-metricbeat
      description: "Beats x-pack metricbeat pipeline"
    spec:
      branch_configuration: "main 7.17 8.* 9.*"
      pipeline_file: ".buildkite/x-pack/pipeline.xpack.metricbeat.yml"
      maximum_timeout_in_minutes: 120
      provider_settings:
        trigger_mode: none # don't trigger jobs from github activity
        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.* !9.*"
      skip_intermediate_builds: true
      skip_intermediate_builds_branch_filter: "!main !7.17 !8.* !9.*"
      env:
        # TODO set to true once https://github.com/elastic/ingest-dev/issues/3001 has been resolved
        ELASTIC_PR_COMMENTS_ENABLED: "false"
      teams:
        ingest-fp:
          access_level: MANAGE_BUILD_AND_READ
        everyone:
          access_level: BUILD_AND_READ

---
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
  name: beats-xpack-elastic-agent-package-7-17
  description: Buildkite pipeline for packaging Elastic Agent v7.17 package
  links:
    - title: Pipeline
      url: https://buildkite.com/elastic/beats-xpack-elastic-agent-package-7-17
spec:
  type: buildkite-pipeline
  owner: group:ingest-fp
  system: platform-ingest
  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      name: beats-xpack-elastic-agent-package-7-17
      description: Buildkite pipeline for packaging Elastic Agent package
    spec:
      repository: elastic/beats
      pipeline_file: ".buildkite/x-pack/elastic-agent/pipeline.xpack.elastic-agent.package.yml"
      provider_settings:
        trigger_mode: none # this pipeline is only triggered remotely
      cancel_intermediate_builds: false
      skip_intermediate_builds: false
      teams:
        ingest-fp:
          access_level: MANAGE_BUILD_AND_READ
        release-eng:
          access_level: BUILD_AND_READ
        everyone:
          access_level: BUILD_AND_READ
---
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
  name: buildkite-elastic-agent-binary-dra-7-17
  description: Buildkite pipeline for packaging Elastic Agent core binary and publish it to DRA
  links:
    - title: Pipeline
      url: https://buildkite.com/elastic/buildkite-elastic-agent-binary-dra-7-17

spec:
  type: buildkite-pipeline
  owner: group:ingest-fp
  system: platform-ingest
  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      name: buildkite-elastic-agent-binary-dra-7-17
      description: Buildkite pipeline for packaging Elastic Agent core binary and publish it to DRA
    spec:
      pipeline_file: ".buildkite/x-pack/elastic-agent/.buildkite/pipeline.xpack.elastic-agent-binary-dra.yml"
      provider_settings:
        build_branches: true
        build_pull_requests: true
        cancel_deleted_branch_builds: true
        filter_condition: 'build.branch == "7.17" || build.pull_request.base_branch == "7.17"'
        filter_enabled: true
      repository: elastic/beats
      teams:
        ingest-fp:
          access_level: MANAGE_BUILD_AND_READ
        everyone:
          access_level: BUILD_AND_READ
      schedules:
        Weekly 7.17:
          branch: "7.17"
          cronline: "@weekly"
          message: Builds `7.17` DRA

---
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
  name: buildkite-pipeline-beats-xpack-auditbeat
  description: "Beats x-pack auditbeat pipeline"
  links:
    - title: Pipeline
      url: https://buildkite.com/elastic/beats-xpack-auditbeat

spec:
  type: buildkite-pipeline
  owner: group:ingest-fp
  system: platform-ingest
  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      name: beats-xpack-auditbeat
      description: "Beats x-pack auditbeat pipeline"
    spec:
      # branch_configuration: "main 7.17 8.*"         #TODO: uncomment after tests
      pipeline_file: ".buildkite/x-pack/pipeline.xpack.auditbeat.yml"
      maximum_timeout_in_minutes: 120
      provider_settings:
        trigger_mode: none # don't trigger jobs from github activity
        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.* !9.*"
      skip_intermediate_builds: true
      skip_intermediate_builds_branch_filter: "!main !7.17 !8.* !9.*"
      env:
        # TODO set to true once https://github.com/elastic/ingest-dev/issues/3001 has been resolved
        ELASTIC_PR_COMMENTS_ENABLED: "false"
      teams:
        ingest-fp:
          access_level: MANAGE_BUILD_AND_READ
        everyone:
          access_level: BUILD_AND_READ

---
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
  name: buildkite-pipeline-beats-xpack-dockerlogbeat
  description: "Beats x-pack dockerlogbeat pipeline"
  links:
    - title: Pipeline
      url: https://buildkite.com/elastic/beats-xpack-dockerlogbeat

spec:
  type: buildkite-pipeline
  owner: group:ingest-fp
  system: platform-ingest
  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      name: beats-xpack-dockerlogbeat
      description: "Beats x-pack dockerlogbeat pipeline"
    spec:
      # branch_configuration: "main 7.17 8.*"         #TODO: uncomment after tests
      pipeline_file: ".buildkite/x-pack/pipeline.xpack.dockerlogbeat.yml"
      maximum_timeout_in_minutes: 120
      provider_settings:
        trigger_mode: none # don't trigger jobs from github activity
        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.* !9.*"
      skip_intermediate_builds: true
      skip_intermediate_builds_branch_filter: "!main !7.17 !8.* !9.*"
      env:
        # TODO set to true once https://github.com/elastic/ingest-dev/issues/3001 has been resolved
        ELASTIC_PR_COMMENTS_ENABLED: "false"
      teams:
        ingest-fp:
          access_level: MANAGE_BUILD_AND_READ
        everyone:
          access_level: BUILD_AND_READ

---
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
  name: buildkite-pipeline-beats-xpack-filebeat
  description: "Beats x-pack filebeat pipeline"
  links:
    - title: Pipeline
      url: https://buildkite.com/elastic/beats-xpack-filebeat

spec:
  type: buildkite-pipeline
  owner: group:ingest-fp
  system: platform-ingest
  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      name: beats-xpack-filebeat
      description: "Beats x-pack filebeat pipeline"
    spec:
      # branch_configuration: "main 7.17 8.*"         #TODO: uncomment after tests
      pipeline_file: ".buildkite/x-pack/pipeline.xpack.filebeat.yml"
      maximum_timeout_in_minutes: 120
      provider_settings:
        trigger_mode: none # don't trigger jobs from github activity
        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.* !9.*"
      skip_intermediate_builds: true
      skip_intermediate_builds_branch_filter: "!main !7.17 !8.* !9.*"
      env:
        # TODO set to true once https://github.com/elastic/ingest-dev/issues/3001 has been resolved
        ELASTIC_PR_COMMENTS_ENABLED: "false"
      teams:
        ingest-fp:
          access_level: MANAGE_BUILD_AND_READ
        everyone:
          access_level: BUILD_AND_READ

---
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
  name: buildkite-pipeline-beats-xpack-heartbeat
  description: "Beats x-pack heartbeat pipeline"
  links:
    - title: Pipeline
      url: https://buildkite.com/elastic/beats-xpack-heartbeat

spec:
  type: buildkite-pipeline
  owner: group:ingest-fp
  system: platform-ingest
  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      name: beats-xpack-heartbeat
      description: "Beats x-pack heartbeat pipeline"
    spec:
      # branch_configuration: "main 7.17 8.*"         #TODO: uncomment after tests
      pipeline_file: ".buildkite/x-pack/pipeline.xpack.heartbeat.yml"
      maximum_timeout_in_minutes: 120
      provider_settings:
        trigger_mode: none # don't trigger jobs from github activity
        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.* !9.*"
      skip_intermediate_builds: true
      skip_intermediate_builds_branch_filter: "!main !7.17 !8.* !9.*"
      env:
        # TODO set to true once https://github.com/elastic/ingest-dev/issues/3001 has been resolved
        ELASTIC_PR_COMMENTS_ENABLED: "false"
      teams:
        ingest-fp:
          access_level: MANAGE_BUILD_AND_READ
        everyone:
          access_level: BUILD_AND_READ

---
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
  name: buildkite-pipeline-beats-xpack-osquerybeat
  description: "Beats x-pack osquerybeat pipeline"
  links:
    - title: Pipeline
      url: https://buildkite.com/elastic/beats-xpack-osquerybeat

spec:
  type: buildkite-pipeline
  owner: group:ingest-fp
  system: platform-ingest
  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      name: beats-xpack-osquerybeat
      description: "Beats x-pack osquerybeat pipeline"
    spec:
      # branch_configuration: "main 7.17 8.*"         #TODO: uncomment after tests
      pipeline_file: ".buildkite/x-pack/pipeline.xpack.osquerybeat.yml"
      maximum_timeout_in_minutes: 120
      provider_settings:
        trigger_mode: none # don't trigger jobs from github activity
        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.* !9.*"
      skip_intermediate_builds: true
      skip_intermediate_builds_branch_filter: "!main !7.17 !8.* !9.*"
      env:
        # TODO set to true once https://github.com/elastic/ingest-dev/issues/3001 has been resolved
        ELASTIC_PR_COMMENTS_ENABLED: "false"
      teams:
        ingest-fp:
          access_level: MANAGE_BUILD_AND_READ
        everyone:
          access_level: BUILD_AND_READ

---
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
  name: buildkite-pipeline-beats-xpack-agentbeat
  description: "Beats x-pack agentbeat pipeline"
  links:
    - title: Pipeline
      url: https://buildkite.com/elastic/beats-xpack-agentbeat

spec:
  type: buildkite-pipeline
  owner: group:ingest-fp
  system: platform-ingest
  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      name: beats-xpack-agentbeat
      description: "Beats x-pack agentbeat pipeline"
    spec:
      # branch_configuration: "main 8.*"         #TODO: uncomment after tests
      pipeline_file: ".buildkite/x-pack/pipeline.xpack.agentbeat.yml"
      maximum_timeout_in_minutes: 120
      provider_settings:
        trigger_mode: none # don't trigger jobs from github activity
        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 !8.* !9.*"
      skip_intermediate_builds: true
      skip_intermediate_builds_branch_filter: "!main !8.* !9.*"
      env:
        # TODO set to true once https://github.com/elastic/ingest-dev/issues/3001 has been resolved
        ELASTIC_PR_COMMENTS_ENABLED: "false"
      teams:
        ingest-fp:
          access_level: MANAGE_BUILD_AND_READ
        everyone:
          access_level: BUILD_AND_READ


---
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
  name: beats-packaging-pipeline
  description: Buildkite pipeline for packaging and publishing to DRA
  links:
    - title: Pipeline
      url: https://buildkite.com/elastic/beats-packaging-pipeline
spec:
  type: buildkite-pipeline
  owner: group:ingest-fp
  system: platform-ingest
  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      name: beats-packaging-pipeline
      description: Pipeline for Beats packaging and publishing DRA artifacts
    spec:
      repository: elastic/beats
      pipeline_file: ".buildkite/packaging.pipeline.yml"
      branch_configuration: "main 8.* 7.17 9.*"
      cancel_intermediate_builds: false
      skip_intermediate_builds: false
      maximum_timeout_in_minutes: 90
      provider_settings:
        build_branches: true
        build_pull_request_forks: false
        build_pull_requests: false
        build_tags: false
        filter_condition: >-
          build.branch =~ /^[0-9]+\.[0-9x]+$$/ || build.branch == "main"
        filter_enabled: true
        trigger_mode: code
      env:
        ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true'
        SLACK_NOTIFICATIONS_CHANNEL: '#ingest-notifications'
        SLACK_NOTIFICATIONS_ON_SUCCESS: 'false'
        SLACK_NOTIFICATIONS_SKIP_FOR_RETRIES: 'true'
      teams:
        ingest-fp:
          access_level: MANAGE_BUILD_AND_READ
        release-eng:
          access_level: BUILD_AND_READ
        everyone:
          access_level: BUILD_AND_READ
      schedules:
        Weekly 7.17:
          branch: "7.17"
          cronline: "@weekly"
          message: "Builds `7.17` DRA"

---
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
  name: beats-ironbank-validation
  description: Buildkite pipeline for validating the Ironbank docker context
  links:
    - title: Pipeline
      url: https://buildkite.com/elastic/beats-ironbank-validation
spec:
  type: buildkite-pipeline
  owner: group:ingest-fp
  system: platform-ingest
  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      name: beats-ironbank-validation
      description: Buildkite pipeline for validating the Ironbank docker context
    spec:
      repository: elastic/beats
      pipeline_file: ".buildkite/ironbank-validation.yml"
      branch_configuration: "main 8.* 7.17 9.*"
      cancel_intermediate_builds: false
      skip_intermediate_builds: false
      provider_settings:
        trigger_mode: none
      teams:
        ingest-fp:
          access_level: MANAGE_BUILD_AND_READ
        release-eng:
          access_level: BUILD_AND_READ
        everyone:
          access_level: BUILD_AND_READ

---
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
  name: beats-aws-tests
  description: 'Runs of Beats AWS tests'
  links:
    - title: Pipeline
      url: https://buildkite.com/elastic/beats-aws-tests
spec:
  type: buildkite-pipeline
  owner: group:ingest-fp
  system: platform-ingest
  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      name: beats-aws-tests
      description: 'Runs of Beats AWS tests'
    spec:
      repository: elastic/beats
      pipeline_file: ".buildkite/aws-tests-pipeline.yml"
      cancel_intermediate_builds: false
      provider_settings:
        trigger_mode: none
      teams:
        ingest-fp:
          access_level: MANAGE_BUILD_AND_READ
        release-eng:
          access_level: BUILD_AND_READ
        everyone:
          access_level: BUILD_AND_READ

---
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
  name: beats-pipeline-scheduler
  description: 'Scheduled runs of various Beats pipelines per release branch'
  links:
    - title: 'Scheduled runs of Beats pipelines per release branch'
      url: https://buildkite.com/elastic/beats-pipeline-scheduler
spec:
  type: buildkite-pipeline
  owner: group:ingest-fp
  system: platform-ingest
  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      name: beats-pipeline-scheduler
      description: ':alarm_clock: Scheduled runs of various Beats pipelines per release branch'
    spec:
      repository: elastic/beats
      pipeline_file: ".buildkite/pipeline-scheduler.yml"
      maximum_timeout_in_minutes: 240
      schedules:
        Daily run of Iron Bank validation:
          branch: main
          cronline: 30 02 * * *
          message: Daily trigger of Iron Bank validation Pipeline per branch
          env:
            PIPELINES_TO_TRIGGER: 'beats-ironbank-validation'
        Daily run of AWS tests:
          branch: main
          cronline: 0 */12 * * *
          message: Daily trigger of Beats AWS tests
          env:
            PIPELINES_TO_TRIGGER: 'beats-aws-tests'
      skip_intermediate_builds: true
      provider_settings:
        trigger_mode: none
      env:
        ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true'
        SLACK_NOTIFICATIONS_CHANNEL: '#ingest-notifications'
        SLACK_NOTIFICATIONS_ON_SUCCESS: 'false'
      teams:
        ingest-fp:
          access_level: MANAGE_BUILD_AND_READ
        release-eng:
          access_level: BUILD_AND_READ
        everyone:
          access_level: BUILD_AND_READ

