# Declare your Buildkite pipelines below

############################# Branch and PR Test Suite #############################
---
# 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-data-extraction-service
  description: Buildkite Pipeline for data-extraction-service
  links:
    - title: Pipeline
      url: https://buildkite.com/elastic/data-extraction-service
spec:
  type: buildkite-pipeline
  owner: group:search-extract-and-transform
  system: buildkite
  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      name: data-extraction-service
      description: For extracting data and metadata from binary documents
    spec:
      repository: elastic/data-extraction-service
      pipeline_file: ".buildkite/pipeline.yml"
      teams:
        search-extract-and-transform:
          access_level: MANAGE_BUILD_AND_READ
        everyone:
          access_level: READ_ONLY

############################# Release Job #############################
---
apiVersion: "backstage.io/v1alpha1"
kind: "Resource"
metadata:
  name: "data-extraction-service-release"
  description: "Data Extraction Service release"
  links:
    - title: "Data Extraction Service Buildkite release Jobs"
      url: "https://buildkite.com/elastic/data-extraction-service-release"
spec:
  type: "buildkite-pipeline"
  owner: "group:search-extract-and-transform"
  system: "buildkite"
  implementation:
    apiVersion: "buildkite.elastic.dev/v1"
    kind: "Pipeline"
    metadata:
      name: "data-extraction-service-release"
      description: "Data Extraction Service release"
      links:
        - title: "Data Extraction Service Buildkite release Jobs"
          url: "https://buildkite.com/elastic/data-extraction-service-release"
    spec:
      pipeline_file: ".buildkite/release.yml"
      provider_settings:
        trigger_mode: "none"
      repository: "elastic/data-extraction-service"
      teams:
        everyone:
          access_level: "READ_ONLY"
        search-extract-and-transform:
          access_level: MANAGE_BUILD_AND_READ
