---
# 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-cloudbeat
  description: Buildkite Pipeline for cloudbeat
  links:
    - title: Pipeline
      url: https://buildkite.com/elastic/cloudbeat

spec:
  type: buildkite-pipeline
  owner: group:cloudbeat
  system: buildkite
  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      name: cloudbeat
    spec:
      repository: elastic/cloudbeat
      pipeline_file: ".buildkite/pipeline.yml"
      provider_settings:
        build_branches: true
        build_tags: false
        build_pull_requests: false
        filter_enabled: true
        filter_condition: build.branch == "main" || build.branch =~ /^[0-9]+\.[0-9x]+$$/
      teams:
        cloud-security-posture:
          access_level: MANAGE_BUILD_AND_READ
        everyone:
          access_level: READ_ONLY
