---
# 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-terraform-provider-elasticstack-release
  description: Buildkite Pipeline for releasing Terraform provider Elasticstack
  links:
    - title: Pipeline
      url: https://buildkite.com/elastic/terraform-provider-elasticstack-release

spec:
  type: buildkite-pipeline
  owner: group:control-plane-hosted-applications
  system: buildkite
  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      name: terraform-provider-elasticstack / release
      description: Terraform provider Elasticstack - release
    spec:
      repository: elastic/terraform-provider-elasticstack
      pipeline_file: ".buildkite/release.yml"
      provider_settings:
        build_branches: false
        build_pull_request_forks: false
        build_tags: true
        filter_condition: 'build.tag =~ /^v[0-9.]+$/'
        filter_enabled: true
      teams:
        control-plane-hosted-applications:
          access_level: MANAGE_BUILD_AND_READ
        serverless-core:
          access_level: MANAGE_BUILD_AND_READ
        everyone:
          access_level: READ_ONLY
