@circleci/backstage-plugin
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

CircleCI Plugin

Website: https://circleci.com/

Screenshots

Setup

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

// For example in the CI/CD section
const cicdContent = (
  <EntitySwitch>
    <EntitySwitch.Case if={isCircleCIAvailable}>
      <EntityCircleCIContent />
    </EntitySwitch.Case>
  1. Add proxy config:
# In app-config.yaml
proxy:
  '/circleci/api':
    target: https://circleci.com/api/v1.1
    headers:
      Circle-Token: ${CIRCLECI_AUTH_TOKEN}
  1. Get and provide a CIRCLECI_AUTH_TOKEN as an environment variable (see the CircleCI docs).
  2. Add an annotation to your respective catalog-info.yaml files, with the format circleci.com/project-slug: <git-provider>/<owner>/<project> (See reference in ADR002).
# Example catalog-info.yaml entity definition file
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

  • CircleCI has pretty strict rate limits per token, be careful with opened tabs
  • CircleCI doesn't provide a way to auth by 3rd party (e.g. GitHub) token, nor by calling their OAuth endpoints, which currently stands in the way of better auth integration with Backstage (reference feature request and discussion topic)

Release Notes

v0.1.0

  • New release under CircleCI
  • Please watch out for new updates in the coming weeks

Readme

Keywords

Package Sidebar

Install

npm i @circleci/backstage-plugin

Weekly Downloads

627

Version

0.1.1

License

Apache-2.0

Unpacked Size

90.8 kB

Total Files

5

Last publish

Collaborators

  • sashal
  • rcircleci
  • jonwebs
  • circle-chrales
  • ewoodscci
  • vallieres-cci
  • nbialostosky
  • julianapaul
  • shawn.fleming
  • samba.tiyyagura
  • pete-woods-cci
  • circlecioliverneubauer
  • christian-stephen
  • mitchellamihod
  • donna.lay
  • jvincent_cci
  • gabiterateur
  • pnhcci
  • brandonniu
  • chris.decairos
  • carlos.leon
  • lavin-ds
  • juanlede
  • shbhnshu-cci
  • npmjoel321
  • calviscci
  • schurchleycci
  • juanmccormick
  • georgi.c8
  • carloscircleci
  • 2shortplanks
  • sarameisburger
  • alexazl
  • avalcepina
  • rosieyohannan
  • stuart133
  • shauncircle
  • tshen815
  • ogii
  • dominikla
  • abdel.driowya
  • dan.szymczak
  • renovate
  • jules-faucherre
  • okmoses
  • ryan-circleci
  • rafaelmtorres
  • aelnahascci
  • chadchabot-cci
  • brennanmackayc
  • domparfitt
  • sds0307
  • roman731
  • liam.clarke
  • sandro_jaya
  • circleci-deploy
  • circleci-bear
  • circleci-ops
  • breon
  • michael_webster
  • janedotbiz
  • andrewwelton
  • kira-m
  • jrwdunham
  • joelthompson
  • enoshanwar
  • spoontstr
  • stigbra
  • briceicle
  • ryanbarkley
  • markl121
  • fernandoabreu2
  • rrakin
  • moratod
  • dotatcircleci
  • bjohnso5
  • semanticallynull
  • brentmmarks
  • jrahme-cci
  • zakizaki
  • keatonus
  • halie-kastl
  • jacquegarcia