CircleCI
Connect
Connect CircleCI from the terminal. Pass --help for the flags CircleCI accepts.
polylane integration connect --type circleciA personal API token from User Settings → Personal API Tokens in CircleCI.
Connect one CircleCI organization with a personal API token.
- In CircleCI Personal API Tokens, create a personal API token. Project API tokens do not work.
- Paste the token into Polylane. Polylane checks it with CircleCI. If the token can reach more than one organization, select the organization to connect.
A workspace can connect each CircleCI organization one time.
How it works
Projects in the context graph
Polylane maps your CircleCI projects into the context graph. It syncs the organization every hour, and a first time one minute after connect. Each project becomes a circleci.project node, and Polylane deletes the node of a project that the organization no longer lists. For each project that the owner of the token follows, Polylane also stores the project slug and the default branch.
What Polylane monitors
Polylane watches workflow failure rates and durations on each project's default branch:
- Failure rate:
failedanderrorruns over all finished runs. Cancelled and unauthorized runs do not count. - p95 duration: of finished runs.
Polylane reads at most 1,000 runs for each workflow. Only a project that the owner of the token follows, and that has a default branch, gets monitors. A sustained change opens an issue on the project node. CircleCI has no organization-level checks.
Failed builds
CircleCI sends no events to Polylane. Polylane reads CircleCI through its API when it needs data. When GitHub is connected and CircleCI reports its results to GitHub as checks, a failed check suite on the default branch or its merge queue becomes an alert. Polylane triages the alert like any other alert, and a new failure starts an investigation.
Agent tools and changes
Read CircleCI pipelines, step logs, and test results, and request API changes through Polylane. Pipeline status reads are always fresh, so a rerun or a cancel shows on the next call.
Through circleciApi, a GET is a read. Every other method needs a reason, safety review and approval before it runs. Project, insights and organization routes must name the connected organization.
Polylane checks the token every six hours. The check passes only while CircleCI accepts the token and the token still reaches the connected organization.
CircleCI APIs
CircleCI personal API tokens have no scopes. A token can do what its owner can do in CircleCI. Polylane uses these CircleCI APIs:
| Tool | CircleCI API | What it unlocks |
|---|---|---|
circleciPipelines | API v2 pipelines, workflows, and jobs | Finds the latest pipelines of a project and the failed jobs of a workflow. |
circleciJobLogs | Job details and step output | Reads the output of the failed steps of a job. |
circleciTests | API v2 test metadata and flaky test insights | Reads the failed tests of a job and the flaky tests of a project. |
circleciApi | Any API v2 endpoint | Calls the CircleCI API. Calls that change state, such as a rerun or a cancel, need safety review and approval. Environment variables, contexts, and checkout keys are not available, for reads or for changes. |
Token replacement
You can replace the personal API token on the CircleCI integration page. The new token must reach the same organization. If it does not, Polylane keeps the current token.
Disconnecting
When you disconnect, Polylane stops the syncs and removes the project nodes of the organization from the context graph. Polylane leaves the personal API token in CircleCI. Remove it under User Settings → Personal API Tokens in CircleCI.
Disconnect
Disconnecting stops every sync and check and deletes the credentials Polylane held. Polylane removes what CircleCI's API lets it remove. The following stays until you remove it yourself:
- CircleCI personal API token
polylane integration disconnect <id>Tools
4Operations agents can perform in threads.