Files
backstage/plugins/circleci
Patrik Oldsberg c614ede9a5 docs: update plugin installation docs
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2021-04-22 18:32:54 +02:00
..
2021-03-12 15:06:01 +03:00
2020-05-18 14:14:03 +02:00
2021-03-18 12:31:44 +00:00
2021-04-22 13:19:35 +00:00

CircleCI Plugin

Website: https://circleci.com/

Setup

  1. If you have standalone app (you didn't clone this repo), then do
yarn add @backstage/plugin-circleci
  1. Add the EntityCircleCIContent extension to the entity page in the app:
// packages/app/src/components/catalog/EntityPage.tsx
import { EntityCircleCIContent } from '@backstage/plugin-circleci';

// ...
const serviceEntityPage = (
  <EntityPageLayout>
    ...
    <EntityLayout.Route path="/circle-ci" title="Circle CI">
      <EntityCircleCIContent />
    </EntityLayout.Route>
    ...
  </EntityPageLayout>
);
  1. Add proxy config:
// app-config.yaml
proxy:
  '/circleci/api':
    target: https://circleci.com/api/v1.1
    headers:
      Circle-Token: ${CIRCLECI_AUTH_TOKEN}
  1. Get and provide CIRCLECI_AUTH_TOKEN as env variable (https://circleci.com/docs/api/#add-an-api-token)
  2. Add circleci.com/project-slug annotation to your catalog-info.yaml file in format // (https://backstage.io/docs/architecture-decisions/adrs-adr002#format)
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
  # ...
  annotations:
    # This also supports bitbucket/xxx/yyy
    circleci.com/project-slug: github/my-org/my-repo
spec:
  type: service
  # ...

Features

  • List top 50 builds for a project
  • Dive into one build to see logs
  • Polling (logs only)
  • Retry builds
  • Works for both project and personal tokens
  • Pagination for builds

Limitations