Buildkite CI/CD Plugin for Backstage
Features
- List Buildkite CI/CD Builds
- Retrigger builds
- Inspect each builds step in real time
How to add Buildkite project dependency to Backstage app
- If you have standalone app (you didn't clone this repo), then do
yarn add @roadiehq/backstage-plugin-buildkite
- Add proxy config:
// app-config.yaml
proxy:
'/buildkite/api':
target: https://api.buildkite.com/v2/
headers:
Authorization:
$env: BUILDKITE_TOKEN
- Add plugin to the list of plugins:
export { plugin as Buildkite } from '@roadiehq/backstage-plugin-buildkite';
- Add plugin API to your Backstage instance:
import {
Router as BuildkiteRouter,
isPluginApplicableToEntity as isBuildkiteAvailable,
} from '@roadiehq/backstage-plugin-buildkite';
const CICDSwitcher = ({ entity }: { entity: Entity }) => {
switch (true) {
case isBuildkiteAvailable(entity):
return <BuildkiteRouter entity={entity} />;
...
}
};
How to use Buildkite plugin in Backstage
- Add annotation to the yaml config file of a component:
metadata:
annotations:
buildkite.com/project-slug: [exampleorganization/exampleproject]
- Get and provide
BUILDKITE_TOKEN
as env variable.
Links