---
# yaml-language-server: $schema=https://json.schemastore.org/catalog-info.json
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
  name: elastic-stack-installers
  description: Windows MSI packages for Elastic stack

  annotations:
    backstage.io/source-location: url:https://github.com/elastic/elastic-stack-installers/
    github.com/project-slug: elastic/elastic-stack-installers
    github.com/team-slug: elastic/ingest-fp

  tags:
    - buildkite
    - windows
    - release
    - stack

spec:
  type: tool
  owner: group:ingest-fp
  lifecycle: beta
  dependsOn:
    - resource:github-repository-elastic-stack-installers
---
# 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-elastic-stack-installers
  description: Buildkite Pipeline for elastic-stack-installers
  links:
    - title: Pipeline
      url: https://buildkite.com/elastic/elastic-stack-installers

spec:
  type: buildkite-pipeline
  owner: group:ingest-fp
  system: buildkite
  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      description: Elastic Stack Installer DRA Pipeline
      name: elastic-stack-installers
    spec:
      pipeline_file: ".buildkite/pipeline.yml"
      provider_settings:
        build_branches: true
        build_pull_request_forks: false
        build_pull_requests: true
        publish_commit_status: true
        publish_commit_status_per_step: false
      repository: elastic/elastic-stack-installers
      teams:
        everyone:
          access_level: BUILD_AND_READ
        ingest-fp: {}
        release-eng: {}
      env:
        ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true'
        SLACK_NOTIFICATIONS_CHANNEL: '#ingest-notifications'
        SLACK_NOTIFICATIONS_ON_SUCCESS: '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-elastic-stack-installers-trigger
  description: Buildkite Pipeline for elastic-stack-installers triggering
  links:
    - title: Pipeline
      url: https://buildkite.com/elastic/elastic-stack-installers-trigger
spec:
  type: buildkite-pipeline
  owner: group:ingest-fp
  system: buildkite
  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      description: Elastic Stack Installer DRA Pipeline Trigger
      name: elastic-stack-installers-trigger
    spec:
      pipeline_file: ".buildkite/scripts/check_beats.sh"
      provider_settings:
        build_branches: false
        build_pull_request_forks: false
        build_pull_requests: false
        publish_commit_status: false
        publish_commit_status_per_step: false
      repository: elastic/elastic-stack-installers
      schedules:
        Daily 8_12:
          branch: "8.12"
          cronline: "*/10 * * * *"
          message: Checking for new beats artifacts for `8.12`
        # trigger for 7_17 still needed for now, details in https://elasticco.atlassian.net/browse/REL-1004?focusedCommentId=107973
        Daily 7_17:
          branch: "7.17"
          cronline: "*/10 * * * *"
          message: Checking for new beats artifacts for `7.17`
      teams:
        everyone:
          access_level: BUILD_AND_READ
        ingest-fp: {}
        release-eng: {}
