---
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
  name: buildkite-pipeline-kibana-github-actions-on-merge
  description: Run tests on merge
  links:
    - title: Pipeline
      url: https://buildkite.com/elastic/kibana-github-actions-on-merge
spec:
  type: buildkite-pipeline
  owner: group:kibana-operations
  system: buildkite
  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      name: kibana-github-actions / on-merge
    spec:
      repository: elastic/kibana-github-actions
      env:
        ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true'
        SLACK_NOTIFICATIONS_CHANNEL: '#kibana-operations-alerts'
      pipeline_file: ".buildkite/pipelines/on_merge.yml"
      branch_configuration: main
      provider_settings:
        build_pull_requests: false
      teams:
        kibana-operations:
         access_level: MANAGE_BUILD_AND_READ
        everyone:
          access_level: READ_ONLY
---
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
  name: buildkite-pipeline-kibana-github-actions-pull-request
  description: Run pull request checks
  links:
    - title: Pipeline
      url: https://buildkite.com/elastic/kibana-github-actions-pull-request
spec:
  type: buildkite-pipeline
  owner: group:kibana-operations
  system: buildkite
  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      name: kibana-github-actions / pull request
    spec:
      repository: elastic/kibana-github-actions
      env:
        ELASTIC_PR_COMMENTS_ENABLED: 'true'
      cancel_intermediate_builds: true
      provider_settings:
        build_branches: false
        filter_enabled: true
        filter_condition: |
          (build.creator.name == 'elasticmachine' && build.pull_request.id != null)
      pipeline_file: ".buildkite/pipelines/pull_request.yml"
      teams:
        kibana-operations:
         access_level: MANAGE_BUILD_AND_READ
        everyone:
          access_level: READ_ONLY
