Skip to content

Latest commit

 

History

History
92 lines (69 loc) · 4.65 KB

index.md

File metadata and controls

92 lines (69 loc) · 4.65 KB
organization category icon_url brand_color display_name name description og_description og_image
Turbot
saas
/images/plugins/turbot/circleci.svg
#04AA51
CircleCI
circleci
Steampipe plugin for querying resource projects, pipelines, builds and more from CircleCI.
Query CircleCI with SQL! Open source CLI. No DB required.
/images/plugins/turbot/circleci-social-graphic.png

CircleCI + Steampipe

CircleCI is the leading open source automation server, CircleCI provides hundreds of plugins to support building, deploying and automating any project.

Steampipe is an open source CLI to instantly query cloud APIs using SQL.

For example:

select
  concat(username, '/', reponame) as repository,
  branch,
  status,
  build_url
from
  circleci_build
order by
  stop_time desc limit 10;
+------------------------------+------------------------+---------+---------------------------------------------------------+
| repository                   | branch                 | status  | build_url                                               |
+------------------------------+------------------------+---------+---------------------------------------------------------+
| fluent-cattle/sp-plugin-test | main                   | failed  | https://circleci.com/gh/fluent-cattle/sp-plugin-test/36 |
| fluent-cattle/prime-osprey   | circleci-project-setup | success | https://circleci.com/gh/fluent-cattle/prime-osprey/1    |
| fluent-cattle/sp-plugin-test | main                   | success | https://circleci.com/gh/fluent-cattle/sp-plugin-test/35 |
| hardy-cub/famous-frog        | circleci-project-setup | success | https://circleci.com/gh/hardy-cub/famous-frog/2         |
+------------------------------+------------------------+---------+---------------------------------------------------------+

Documentation

Get started

Install

Download and install the latest CircleCI plugin:

steampipe plugin install circleci

Credentials

Item Description
Credentials CircleCI requires an API token for all requests.
Permissions API tokens have the same permissions as the user who creates them, and if the user permissions change, the API token permissions also change.
Radius Each connection represents a single CircleCI Installation.
Resolution 1. Credentials explicitly set in a steampipe config file (~/.steampipe/config/circleci.spc)
2. Credentials specified in environment variables, e.g., CIRCLECI_TOKEN.

Configuration

Installing the latest circleci plugin will create a config file (~/.steampipe/config/circleci.spc) with a single connection named circleci:

connection "circleci" {
  plugin = "circleci"

  # Get your API token from CircleCI https://circleci.com/docs/api-developers-guide/#add-an-api-token
  # This can also be set via the `CIRCLECI_TOKEN` environment variable.
  # api_token = "1234ee38fc6943f6cb9537a564e9a6dac6ef1463"
}

Credentials from Environment Variables

The CircleCI plugin will use the standard CircleCI environment variables to obtain credentials only if other arguments (api_token) are not specified in the connection:

export CIRCLECI_TOKEN=1234ee38fc6943f6cb9537a564e9a6dac6ef1463

Get involved