A Backstage plugin which integrates with Buildkite pipelines
npm install @buildkite/backstage-plugin-buildkiteA Buildkite plugin for Backstage that provides deep integration with your Buildkite CI/CD pipelines. This plugin allows you to monitor the status of your pipelines and manage their builds from a single interface.
- Buildkite account with API access
- Required API token permissions:
- read_pipelines
- read_builds
- read_user
- write_builds (for rebuild functionality)
If the plugin is in your project's plugins directory:
``bash`
yarn workspace app add @buildkite/backstage-plugin-buildkite
If you're installing from an external package:
`bash`
yarn workspace app add @buildkite/backstage-plugin-buildkite
1. Add the proxy configuration to your app-config.yaml:
`yaml`
proxy:
endpoints:
'/buildkite/api':
target: https://api.buildkite.com/v2
headers:
Authorization: Bearer ${BUILDKITE_API_TOKEN}
Accept: application/json
allowedHeaders: ['Authorization']
Note: The plugin uses the Backstage proxy for authentication. The organization and pipeline are specified per-entity via annotations (see Component Configuration below).
Optional configuration can be added to app-config.yaml:
`yaml`
buildkite:
# Optional: Override the API base URL (default: https://api.buildkite.com/v2)
apiBaseUrl: https://api.buildkite.com/v2
# Optional: Set default page size for pagination (default: 25)
defaultPageSize: 25
2. Add routes in packages/app/src/App.tsx:
`typescript
import { PipelinePage } from '@buildkite/backstage-plugin-buildkite';
const routes = (
{/ Other routes... /}
{/ Buildkite Plugin Routes /}
);
`
3. Add to your Entity Page in packages/app/src/components/catalog/EntityPage.tsx:
`typescript
import { isBuildkiteAvailable, BuildkiteWrapper } from '@buildkite/backstage-plugin-buildkite';
const cicdContent = (
missing="info"
description="Add a Buildkite annotation to enable CI/CD visualization"
/>
);
const defaultEntityPage = (
{/ Other routes... /}
{cicdContent}
);
`
Add the Buildkite annotation to your component's catalog-info.yaml:
`yaml``
metadata:
annotations:
buildkite.com/pipeline-slug: organization-slug/pipeline-slug
For further usage tips for the Buildkite plugin for Backstage, as well as deployment visibility overview and troubleshooting, see the the official Buildkite Documentation:
- Plugin overview
- Deployment tracking
- Deployment visibility with Backstage
For guidelines and requirements regarding contributing to the Buildkite Agent Stack for Kubernetes controller, please see the Contributing/Development Guide.