---
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
  name: buildkite-pipeline-elasticsearch-sql-odbc
  description: On-merge pipeline for elasticsearch-sql-odbc tests
  links:
    - title: Pipeline
      url: https://buildkite.com/elastic/elasticsearch-sql-odbc
spec:
  type: buildkite-pipeline
  owner: group:elasticsearch-team
  system: buildkite
  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      name: elasticsearch-sql-odbc
    spec:
      repository: elastic/elasticsearch-sql-odbc
      pipeline_file: .buildkite/pipeline.yml
      default_branch: main
      branch_configuration: "main 9.* 8.* 7.17"
      provider_settings:
        trigger_mode: code
        build_pull_requests: false
        build_pull_request_forks: false
        publish_commit_status: false
        build_branches: true
      teams:
        elasticsearch-team:
          access_level: MANAGE_BUILD_AND_READ
        everyone:
          access_level: BUILD_AND_READ
---
# 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-elasticsearch-sql-odbc-dra-workflow
  description: Publishes DRA snapshot or staging candidate
  links:
    - title: Pipeline
      url: https://buildkite.com/elastic/elasticsearch-sql-odbc-dra-workflow
spec:
  type: buildkite-pipeline
  system: buildkite
  owner: group:elasticsearch-team
  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      description: "Publishes DRA snapshot or staging candidate"
      name: elasticsearch-sql-odbc / dra-workflow
    spec:
      repository: elastic/elasticsearch-sql-odbc
      pipeline_file: .buildkite/pipeline.dra.yml
      env:
        ENABLE_DRA_WORKFLOW: "true"
      default_branch: main
      branch_configuration: "main 9.* 8.* 7.17"
      cancel_intermediate_builds: false
      skip_intermediate_builds: false
      teams:
        elasticsearch-team: {}
        everyone:
          access_level: BUILD_AND_READ
      provider_settings:
        trigger_mode: none
        build_pull_requests: false
        build_pull_request_forks: false
        publish_commit_status: false
        build_branches: false
---
# 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-elasticsearch-sql-odbc-dra-workflow-trigger
  description: Triggers piplines for DRA workflows for all release branches
  links:
    - title: Pipeline
      url: https://buildkite.com/elastic/elasticsearch-sql-odbc-dra-workflow-trigger
spec:
  type: buildkite-pipeline
  system: buildkite
  owner: group:elasticsearch-team
  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      description: Triggers piplines for DRA workflows for all release branches
      name: elasticsearch-sql-odbc / dra-workflow-trigger
    spec:
      repository: elastic/elasticsearch-sql-odbc
      pipeline_file: .buildkite/dra-workflow.trigger.sh
      default_branch: main
      branch_configuration: main
      teams:
        elasticsearch-team: {}
        everyone:
          access_level: BUILD_AND_READ
      provider_settings:
        trigger_mode: none
        build_pull_requests: false
        build_pull_request_forks: false
        publish_commit_status: false
        build_branches: false
      schedules:
        Periodically on main:
          branch: main
          cronline: "0 0,12 * * * America/New_York"
          message: "Triggers DRA workflows 2x per day"
