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.
- View information about CircleCI workflows and pipelines on entity pages in Cortex
- Create Scorecards that track progress and drive alignment on projects involving your CircleCI data
How to configure CircleCI with Cortex
Prerequisites
Before getting started:- Create a CircleCI API token.
Configure the integration in Cortex
- In Cortex, navigate to the CircleCI settings page.
- Click Integrations from the main nav. Search for and select CircleCI.
- Click Add configuration.
- 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
- Click Save.
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.x-cortex-circle-ci block:
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 -
ghfor GitHub orbbfor Bitbucket. - Organization - The GitHub organization or Bitbucket workspace that owns the repository.
- Repository - The repository name.
x-cortex-git block, you can build the slug from that value. For example, for an entity with this Git configuration:
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:
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.Check for CircleCI flaky tests
Check for CircleCI flaky tests
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 Circle CI projects
Get Circle CI projects
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.

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.