Skip to main content
Cortex connects to many third-party vendors whose system interfaces frequently change. As a result, integration behavior or configuration steps may shift without notice. If you encounter unexpected issues, check with your system administrator or refer to the vendor’s documentation for the most current information. Additionally, integration sync times vary and are subject to scheduling overrides and timing variance.
CircleCI is continuous integration and continuous delivery platform that can be used to implement DevOps best practices. Integrating CircleCI with Cortex allows you to:

How to configure CircleCI with Cortex

Prerequisites

Before getting started: Self-hosted CircleCI instances If you’re using a self-hosted instance of CircleCI, you’ll need to verify that your Cortex instance is able to reach the CircleCI instance. We route our requests through a static IP address. Reach out to support at help@cortex.io to receive details about our static IP. If you’re unable to directly allowlist our static IP, you can route requests through a secondary proxy in your network that has this IP allowlisted and have that proxy route traffic to your CircleCI instance.

Configure the integration in Cortex

  1. In Cortex, navigate to the CircleCI settings page.
    • Click Integrations from the main nav. Search for and select CircleCI.
  2. Click Add configuration.
  3. Configure the integration form:
    • Account alias: Enter an alias for this integration, used to tie entity registrations to different configurations.
    • API token: Enter the value of the API token you created in CircleCI.
    • Host: Enter the URL for your CircleCI instance if self-hosted, e.g., https://cortex.circleci.com
  4. Click Save.
Configure the integration for multiple CircleCI accounts The CircleCI integration has multi-account support. You can add a configuration for each additional by repeating the process above. Each configuration requires an alias, which Cortex uses to correlate the designated with registrations for various entities. Registrations can also use a default configuration without a listed alias. You can edit aliases and default configurations from the CircleCI page in your Cortex settings. Select the edit icon next to a given configuration and toggle Set as default on. If you only have one configuration, it will automatically be set as the default.

How to connect Cortex entities to CircleCI

Editing the entity descriptor

The YAML examples on this page show only the x-cortex-* block. When you add one to an entity descriptor, nest it inside the info section. Blocks at the root level of the file are ignored without an error. For a full example, see Defining entities with YAML.
You can define CircleCI projects in an entity’s YAML descriptor. Add each project’s full project slug under the x-cortex-circle-ci block:
Cortex sends projectSlug to CircleCI exactly as written. A slug that contains only the repository name (for example, auth-service) doesn’t match a CircleCI project, so Cortex can’t retrieve data for the entity.

Finding the project slug

The slug format depends on how your project is connected to CircleCI. Projects connected through the GitHub OAuth app or Bitbucket These projects use the format {vcs}/{org}/{repo}:
  • VCS type - gh for GitHub or bb for Bitbucket.
  • Organization - The GitHub organization or Bitbucket workspace that owns the repository.
  • Repository - The repository name.
If the entity already has a Git repository defined in its x-cortex-git block, you can build the slug from that value. For example, for an entity with this Git configuration:
The CircleCI project slug is gh/my-org/auth-service. Projects connected through GitLab or the CircleCI GitHub App These projects use the format circleci/{org-id}/{project-id}, where both values are IDs assigned by CircleCI:
You can’t build this slug from x-cortex-git. Copy it from your project settings in CircleCI instead.

Using the CircleCI integration

Viewing CircleCI information on entity pages

When an entity has a CircleCI project defined in its YAML file, you will see metric and pipeline details on an entity’s details page. Click CI/CD > CircleCI in the entity’s sidebar to see this information.

Scorecards and CQL

With the CircleCI integration, you can create Scorecard rules and write CQL queries based on CircleCI metrics and pipelines. See more examples in the CQL Explorer in Cortex.
Get all Circle CI flaky tests associated with the entity.Definition: circleci.flakyTests()ExampleYou could create a Scorecard with a rule that verifies no flaky tests:
Get all Circle CI projects associated with the entity.Definition: circleci.projects()ExampleYou could also create a rule that checks for a success rate over 90%:

View integration logs

This feature is available in Cortex cloud.
While viewing an integration’s settings page, select the Error logs tab to view errors from the last 7 days. You can filter the logs list by configuration and by operation (for example, you could filter to view errors surfaced only via Scorecards).
The 'Logs' tab on an integration's settings page shows error information over the past 7 days.
Click into a row to get more information, including time stamp, status code, full error, and request path.

Still need help?

The following options are available to get assistance from the Cortex Customer Engineering team:
  • Email: help@cortex.io, or open a support ticket in the in app 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.
Last modified on October 21, 2026