0.0.5 • Published 3 years ago
@oriol.hidalgo.tui/backstage-plugin-clone-entity-repository v0.0.5
Backstage Plugin: Clone Entity Repository
Installation
Add the plugin as a package.json dependency
yarn add --cwd packages/app @oriol.hidalgo.tui/backstage-plugin-clone-entity-repository
Import the plugin on the EntityPage.tsx
# packages/app/src/components/catalog/EntityPage.tsx
import {
EntityCloneEntityRepoCard,
isCloneEntityRepoAvailable
} from '@oriol.hidalgo.tui/backstage-plugin-clone-entity-repository';
Add the EntityCloneEntityRepoCard on the EntityPage.tsx
# packages/app/src/components/catalog/EntityPage.tsx
const overviewContent = (
<Grid container spacing={3} alignItems="stretch">
...
<EntitySwitch>
<EntitySwitch.Case if={isCloneEntityRepoAvailable}>
<Grid item>
<EntityCloneEntityRepoCard/>
</Grid>
</EntitySwitch.Case>
</EntitySwitch>
...
</Grid>
}
To activate the plugin, any of the two available annotations have to be declared on the catalog-info.yaml
metadata:
...
annotations:
clone-repo/https: 'CLONE REPO URI'
clone-repo/ssh: 'CLONE REPO URI'
...
0.0.5
3 years ago