# Declare a Backstage Component that represents rally-tracks
---
# yaml-language-server: $schema=https://json.schemastore.org/catalog-info.json
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
  name: rally-tracks
  description: This repository contains the default track specifications for the Elasticsearch benchmarking tool Rally.
  annotations:
    backstage.io/source-location: url:https://github.com/elastic/rally-tracks
    github.com/project-slug: elastic/rally-tracks
    github.com/team-slug: elastic/es-perf
    buildkite.com/project-slug: elastic/rally-tracks
  tags:
    - elasticsearch
    - benchmark
    - python
    - performance
spec:
  type: application
  owner: group:es-perf
  lifecycle: production
  dependsOn: 
    - "resource:rally-tracks-it"
    - "resource:rally-tracks-it-serverless"


---
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
  name: rally-tracks-it
  description: Run Rally Tracks integration tests
  links:
    - title: Pipeline
      url: https://buildkite.com/elastic/rally-tracks-it

spec:
  type: buildkite-pipeline
  owner: group:es-perf
  system: buildkite

  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      name: Rally Tracks - IT
    spec:
      env:
        ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true'
        SLACK_NOTIFICATIONS_CHANNEL: '#es-perf-build'
      pipeline_file: .buildkite/it/pipeline.yml
      repository: elastic/rally-tracks
      teams:
        es-perf: {}
        elasticsearch-team:
          access_level: 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: rally-tracks-it-serverless
  description: Run Rally Tracks integration tests for serverless
  links:
    - title: Pipeline
      url: https://buildkite.com/elastic/rally-tracks-it-serverless

spec:
  type: buildkite-pipeline
  owner: group:es-perf
  system: buildkite

  implementation:
    apiVersion: buildkite.elastic.dev/v1
    kind: Pipeline
    metadata:
      name: Rally Tracks - IT Serverless
    spec:
      env:
        ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true'
        SLACK_NOTIFICATIONS_CHANNEL: '#es-perf-build'
      pipeline_file: .buildkite/it/serverless-pipeline.yml
      repository: elastic/rally-tracks
      schedules:
        Daily:
          branch: master
          cronline: "0 14 * * *"
          message: periodic it serverless
      teams:
        es-perf: {}
        elasticsearch-team:
          access_level: BUILD_AND_READ
        everyone:
          access_level: READ_ONLY
