Skip to main content

CircleCI

CircleCI is a continuous integration and continuous delivery (CI/CD) platform that automates software build, test, and deployment workflows. This integration enables querying and analysis of CircleCI infrastructure, configurations, pipelines, builds, workflows, and execution metrics for operational monitoring, security auditing, compliance verification, and development pipeline optimization.

CategorySource control & CI/CD
DirectionQuery source
Sign-inAPI Token
Query languagesSQLite
Tables8
Query templates20
Websitecircleci.com

Before you start​

Huntbase signs in to CircleCI with API Token. Create the credential in CircleCI first, then keep it to hand for the Connect step.

  1. In the CircleCI app, open User settings and select Personal API Tokens.
  2. Click Create New Token and enter a name in Token name.
  3. Set an expiry date. The maximum is one year.
  4. Click Add API Token and copy the token. You can't view it again.

Permissions:

  • The token has the same permissions as the user who creates it. Create it as a user who can see only the projects Huntbase should read.
Watch out for
  • Personal API tokens have full read and write access to the CircleCI API. You can't scope a personal token to read-only.
  • The token stops working at its expiry date. CircleCI emails you before it expires.

For the vendor's own instructions, see CircleCI API token documentation.

tip

Use a dedicated, read-only credential for Huntbase where the product allows it. Huntbase only needs to read.

Connect CircleCI​

  1. Go to Connections and click New connection, or click New connection on the CircleCI product page.
  2. On Product, pick CircleCI and choose the Owner.
  3. On Details, give the connection a Name and, optionally, a Description.
  4. On Connect, fill in the settings and credentials described below.
  5. On Verify, review the summary and click Create & check.

For everything else on the setup page — saving a draft, I'll do this later, and what each check result means — see Connections.

Credentials​

The only Method is API Token. Enter a Credential label (for example Production), then fill in:

FieldRequiredNotes
API TokenYesSecret — not shown again after you save it.

Query it​

Once connected, CircleCI can serve these languages in a query tab, and Scout can use it when you ask in Auto:

LanguageUse it for
SQLiteSQL over the 8 tables listed below, alongside every other connected source.

Example: SQLite​

Organizations I have access to — Explore the different organizations you have access to and their associated version control systems, allowing you to better manage your resources and align your operations with your access privileges.

select
name,
vcs_type
from
circleci_organization
order by
name;

CircleCI ships with 20 query templates. Find them in Library › Queries — see Query templates.

Tables​

CircleCI adds 8 tables. Browse their columns from Schema in the query bar's ⋯ menu.

All 8 tables
TableContains
circleci_buildA CircleCI build is a result of a single execution of a workflow.
circleci_contextCircleCI context provide a mechanism for securing and sharing environment variables across projects.
circleci_context_environment_variableCircleCI context environment variables store customer data that is used by projects.
circleci_insights_workflow_runGet insights on project workflows runs.
circleci_organizationCircleCI organization is a representation of a VCS account ownership.
circleci_pipelineCircleCI pipelines are the highest-level unit of work, encompassing a project’s full .circleci/config.yml file.
circleci_projectA CircleCI project shares the name of the code repository for which it automates workflows, tests, and deployment.
circleci_workflowWorkflows define a list of jobs and their run order.

Next steps​