LogoLogo
Login to CortexBook a DemoCortex Academycortex.io
  • Cortex Docs
  • Cortex Quick Start
  • Ingesting data into Cortex
    • Managing Entities
      • Adding entities
        • Add services
        • Add domains
        • Add teams
        • Add custom entity types
        • Defining dependencies
      • Entity details page
      • Defining ownership
      • Defining relationship types
      • Grouping entities
      • Adding external documentation
      • Adding Deploy data
      • Adding custom data
      • Viewing discovered entities
      • Archiving entities
      • Relationship graph
      • Using On-call Assistant for incidents
      • Managing Terraform infra in Cortex
    • Managing Catalogs
    • Integrations
      • Internally hosted integrations
      • ArgoCD
      • AWS
      • Azure DevOps
      • Azure Resources
      • BambooHR
      • Bitbucket
      • BugSnag
      • Buildkite
      • Checkmarx
      • CircleCI
      • ClickUp
      • Codecov
      • Coralogix
      • Custom webhook integrations
      • Datadog
      • Dynatrace
      • Entra ID (Azure AD)
      • FireHydrant
      • GitHub
      • GitLab
      • Google
      • Grafana
      • incident.io
      • Instana
      • Jenkins
      • Jira
      • Kubernetes
      • LaunchDarkly
      • Lightstep
      • Mend
      • Microsoft Teams
      • New Relic
      • Okta
      • Opsgenie
      • PagerDuty
      • Prometheus
      • Rollbar
      • Rootly
      • Sentry
      • ServiceNow
      • Slack
      • Snyk
      • SonarQube
      • Splunk Observability Cloud (SignalFx)
      • Splunk On-Call (VictorOps)
      • Sumo Logic
      • Veracode
      • Wiz
      • Workday
      • xMatters
  • Scorecards
    • Initiatives and Action items
      • Creating issues based on Initiatives
    • Scorecard rule exemptions
    • Scorecard rule filters
    • Scorecard examples
    • Scorecards as code
  • Reports
    • Executive report
    • All Scorecards report
    • Bird's eye report
    • Progress report
    • Report card
  • Eng Intelligence
    • Custom Metrics
    • Jira Metrics
    • Metrics Explorer (Beta)
  • Cortex Query Language (CQL)
    • Using CQL reports
    • Using JQ in Cortex
  • Workflows
    • Creating a Workflow
      • Workflows as code
    • Blocks
    • Running a Workflow
    • Registering a Scaffolder template
      • Scaffolder advanced usage
    • Using a Workflow to sync in ArgoCD
    • Kicking off a Jenkins pipeline in a Workflow
    • Calling internal service endpoints in a Workflow
  • Plugins
    • Creating a plugin
      • Creating a plugin proxy
    • Migrating Backstage plugins to Cortex
  • Engineering homepage
  • Workspace Settings
    • Using GitOps for Cortex
      • GitOps logs
    • Managing users
      • Roles and permissions
        • Custom roles
        • Team ownership entity editing
      • Configuring SSO
        • Microsoft Entra ID
        • Google
        • Other OIDC providers
        • Okta
          • Okta SCIM
      • Configuring identity mappings
      • Onboarding management
    • API keys, secrets, and tokens
      • Secrets
      • Personal tokens
    • Audit logs
    • Entity settings
      • Data verification
      • Auto archiving entities
    • IP allowlist
    • Notifications
      • Notification logs
    • Customizing your workspace
    • Using search in Cortex
  • Cortex API
    • REST API operations
      • API Keys
      • Audit Logs
      • Catalog Entities
      • Custom Data
        • Custom Data (Advanced)
      • Custom Events
      • Custom Metrics
      • Dependencies
      • Deploys
      • Discovery Audit
      • Docs
      • Eng Intel: User Labels
      • Entity Relationship Types (Beta)
      • Entity Relationships (Beta)
      • Entity Types
      • GitOps Logs
      • Groups
      • Initiatives
      • Integrations APIs
        • Azure Active Directory (Entra ID) API
        • Azure Resources API
        • AWS API
        • Azure DevOps API
        • CircleCI API
        • Coralogix API
        • Datadog API
        • GitHub API
        • GitLab API
        • incident.io API
        • LaunchDarkly API
        • New Relic API
        • PagerDuty API
        • Prometheus API
        • SonarQube API
      • IP Allowlist
      • Notification Logs
      • On call
      • Packages
      • Plugins
      • Queries
      • SCIM
      • Scorecards
      • Secrets
      • Team Hierarchies
      • Teams
      • Workflows
Powered by GitBook
On this page
  • How to configure Buildkite with Cortex
  • Prerequisites
  • Configure the integration in Cortex
  • How to connect Cortex entities to Buildkite
  • Discovery
  • Editing the entity descriptor
  • Expected results
  • Scorecards and CQL
  • Still need help?​

Was this helpful?

Export as PDF
  1. Ingesting data into Cortex
  2. Integrations

Buildkite

Last updated 2 months ago

Was this helpful?

is a continuous integration and delivery platform that enablers users to run fast, secure, and scalable pipelines on their own infrastructure.

Integrating Buildkite with Cortex allows you to:

  • Pull in metrics about your builds and pipelines

  • Create that track progress and drive alignment on projects involving your Buildkite pipelines

How to configure Buildkite with Cortex

Prerequisites

Before getting started:

  • Create a with read-only permissions for pipelines and builds.

    • You must be a member of a Buildkite organization to generate and use an access token for it.

Configure the integration in Cortex

  1. In Cortex, navigate to the :

    1. In Cortex, click your avatar in the lower left corner, then click Settings.

    2. Under "Integrations," click Buildkite.

  2. Configure the Buildkite integration form:

    • API token: Enter your Buildkite API token.

    • Organizational slug: Enter the slug for your Buildkite organization.

      • This can be found in your organization's Buildkite settings, or at the end of your Buildkite URL after navigating to Pipelines.

  3. Click Save.

How to connect Cortex entities to Buildkite

Discovery

By default, Cortex will use the entity tag (e.g. my-entity) for your Buildkite pipeline. For example, if your entity tag is my-pipeline, then the corresponding pipeline tag in Buildkite should also be my-pipeline.

Cortex will also use the the GitHub, GitLab, Bitbucket, or Azure DevOps repository to connect entities to Buildkite pipelines. For example, if the GitHub repo associated with your Buildkite pipeline is my-org/repo, then entities in Cortex that also live in my-org/repo will populate with details from that pipeline.

Editing the entity descriptor

You can add Buildkite pipelines to an entity by defining the pipeline slug or tags with one of the following blocks in the entity descriptor:

x-cortex-ci-cd:
  buildkite:
    pipelines:
    - slug: my-buildkite-pipeline-slug-1
    - slug: my-buildkite-pipeline-slug-2
Field
Description
Required

slug

Slug for the Buildkite pipeline

✓

x-cortex-ci-cd:
  buildkite:
    tags:
    - tag: my-buildkite-tag-1
    - tag: my-buildkite-tag-2
Field
Description
Required

tag

Tag for the Buildkite pipeline

✓

The slug for your pipeline can be found in the Buildkite URL for a given pipeline (e.g., https://buildkite.com//).

Expected results

Entity pages

Once the Buildkite integration is established, Cortex will automatically pull in pipeline data to an entity's page. You can access this data from the CI/CD page in the entity's side panel.

You can find a list of pipeline runs for each pipeline linked to a given entity on this page:

  • Pipeline slug/tag

  • Action (e.g. "scheduled build")

  • Timestamp

  • Branch

  • State

Scorecards and CQL

With the Buildkite integration, you can create Scorecard rules and write CQL queries based on Buildkite pipelines.

Check if Buildkite pipeline(s) are set

Check if entity has registered Buildkite pipelines in its entity descriptor.

Definition: buildkite (==/!=) null

Example

For a Scorecard focused on production readiness, you can pull in data from Buildkite to make sure that entities belong to a CI/CD pipeline.

buildkite != null
Get Buildkite build(s)

Gets pipelines and builds that meet given filter criteria.

  • Build criteria:

    • Branch

    • Commit

    • Created at

    • ID

    • Message

    • Number

    • Pipeline

    • State

  • Pipeline criteria:

    • Description

    • Git repository

    • ID

    • Name

    • Slug

    • Tags

States include CANCELED, PASSED, and FAILED.

Definition: buildkite.builds()

Example

If you're building a Scorecard with an emphasis on operational maturity, you could set a rule to make sure not only that entities belong to a pipeline, but that the pipeline is functioning as expected.

buildkite.builds(states["passed"]).length >=1
Get Buildkite pipelines

Get all Buildkite pipelines associated with the entity: Description, Git repository, ID, Name, Slug, Tags.

Definition: buildkite.pipelines()

Example

A production readiness Scorecard can use this expression in a rule confirming that there are pipelines linked to a specific repository:

buildkite.pipelines().any((pipeline) => pipeline.gitRepository = )

The following options are available to get assistance from the Cortex Customer Engineering team:

  • Chat: Available in the Resource Center

  • Slack: Users with a connected Slack channel will have a workflow added to their account. From here, you can either @CortexTechnicalSupport or add a :ticket: reaction to a question in Slack, and the team will respond directly.

Don’t have a Slack channel? Talk with your Customer Success Manager.

The for a build will appear as a tag next to the pipeline slug/tag (e.g. canceled, passed, or failed).

See more examples in the in Cortex.

Still need help?

Email: , or open a support ticket in the in app Resource Center

state
CQL Explorer
​
help@cortex.io
Buildkite
Buildkite API access token
Buildkite settings page
Scorecards