Install the plugin into Backstage.
yarn add @backstage/plugin-cloudbuild
Add plugin to the list of plugins.
// packages/app/src/plugins.ts
export { plugin as Cloudbuild } from '@backstage/plugin-cloudbuild';
Add plugin API to your Backstage instance.
// packages/app/src/components/catalog/EntityPage.tsx
import {
Router as CloudbuildRouter,
isPluginApplicableToEntity as isCloudbuildAvailable,
} from '@backstage/plugin-cloudbuild';
const CICDSwitcher = ({ entity }: { entity: Entity }) => {
switch (true) {
...
case isCloudbuildAvailable(entity):
return <CloudbuildRouter entity={entity} />;
...
}
}
Add annotation to your component-info.yaml file.
metadata:
annotations:
google.com/cloudbuild-project-slug: [your-project-slug]
Found a mistake? Update these instructions.
Don't want to spend your time installing and manually upgrading each Backstage plugin?
How it looks
Become a Backstage expert
To get the latest news, deep dives into Backstage features, and a roundup of recent open-source action, sign up for Roadie's Backstage Weekly. See recent editions.