Skip to content

Commit

Permalink
Merge pull request #239 from awanlin/topic/add-scaffolder
Browse files Browse the repository at this point in the history
Added Scaffolder
  • Loading branch information
awanlin authored Feb 8, 2024
2 parents 1df9e4f + 69c5cc1 commit 39083df
Show file tree
Hide file tree
Showing 7 changed files with 1,446 additions and 15 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ENV PYTHON /usr/bin/python3
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && \
apt-get install -y --no-install-recommends libsqlite3-dev python3 build-essential && \
apt-get install -y --no-install-recommends libsqlite3-dev python3 g++ build-essential && \
rm -rf /var/lib/apt/lists/*

USER node
Expand Down Expand Up @@ -61,7 +61,7 @@ ENV PYTHON /usr/bin/python3
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && \
apt-get install -y --no-install-recommends libsqlite3-dev \
apt-get install -y --no-install-recommends libsqlite3-dev g++ build-essential \
python3 python3-pip python3-venv \
curl default-jre graphviz fonts-dejavu fontconfig && \
rm -rf /var/lib/apt/lists/* && \
Expand Down
1 change: 1 addition & 0 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"@backstage/plugin-graphiql": "^0.3.3-next.2",
"@backstage/plugin-home": "^0.6.2-next.2",
"@backstage/plugin-org": "^0.6.20-next.2",
"@backstage/plugin-scaffolder": "^1.18.0-next.2",
"@backstage/plugin-search": "^1.4.6-next.2",
"@backstage/plugin-search-react": "^1.7.6-next.2",
"@backstage/plugin-tech-radar": "^0.6.13-next.2",
Expand Down
7 changes: 7 additions & 0 deletions packages/app/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,18 @@ import { CssBaseline } from '@material-ui/core';
import { HomepageCompositionRoot, VisitListener } from '@backstage/plugin-home';
import { HomePage } from './components/home/HomePage';
import { CustomizableHomePage } from './components/home/CustomizableHomePage';
import { ScaffolderPage, scaffolderPlugin } from '@backstage/plugin-scaffolder';

const app = createApp({
apis,
plugins: [badgesPlugin],
bindRoutes({ bind }) {
bind(catalogPlugin.externalRoutes, {
createComponent: scaffolderPlugin.routes.root,
viewTechDoc: techdocsPlugin.routes.docRoot,
createFromTemplate: scaffolderPlugin.routes.selectedTemplate,
});
bind(scaffolderPlugin.externalRoutes, {
viewTechDoc: techdocsPlugin.routes.docRoot,
});
bind(catalogGraphPlugin.externalRoutes, {
Expand Down Expand Up @@ -101,6 +107,7 @@ const routes = (
<HomePage />
</Route>
</FeatureFlagged>
<Route path="/create" element={<ScaffolderPage />} />
<Route path="/api-docs" element={<ApiExplorerPage />} />
<Route
path="/catalog"
Expand Down
2 changes: 2 additions & 0 deletions packages/app/src/components/Root/Root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import ExtensionIcon from '@material-ui/icons/Extension';
import MapIcon from '@material-ui/icons/MyLocation';
import LayersIcon from '@material-ui/icons/Layers';
import LibraryBooks from '@material-ui/icons/LibraryBooks';
import CreateComponentIcon from '@material-ui/icons/AddCircleOutline';
import MoneyIcon from '@material-ui/icons/MonetizationOn';
import LogoFull from './LogoFull';
import LogoIcon from './LogoIcon';
Expand Down Expand Up @@ -84,6 +85,7 @@ export const Root = ({ children }: PropsWithChildren<{}>) => (
<SidebarItem icon={CategoryIcon} to="/" text="Catalog" />
<SidebarItem icon={ExtensionIcon} to="api-docs" text="APIs" />
<SidebarItem icon={LibraryBooks} to="docs" text="Docs" />
<SidebarItem icon={CreateComponentIcon} to="create" text="Create..." />
<SidebarItem icon={LayersIcon} to="explore" text="Explore" />
</SidebarGroup>
<SidebarDivider />
Expand Down
3 changes: 3 additions & 0 deletions packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,13 @@
"@backstage/plugin-auth-node": "^0.4.4-next.2",
"@backstage/plugin-badges-backend": "^0.3.7-next.2",
"@backstage/plugin-catalog-backend": "^1.17.0-next.2",
"@backstage/plugin-catalog-backend-module-scaffolder-entity-model": "^0.1.7-next.2",
"@backstage/plugin-explore-backend": "^0.0.20-next.2",
"@backstage/plugin-explore-common": "^0.0.2",
"@backstage/plugin-permission-common": "^0.7.12",
"@backstage/plugin-proxy-backend": "^0.4.8-next.2",
"@backstage/plugin-scaffolder-backend": "^1.21.0-next.2",
"@backstage/plugin-scaffolder-backend-module-github": "^0.2.0-next.2",
"@backstage/plugin-search-backend": "^1.5.0-next.2",
"@backstage/plugin-search-backend-module-catalog": "^0.1.14-next.2",
"@backstage/plugin-search-backend-module-explore": "^0.1.14-next.2",
Expand Down
5 changes: 5 additions & 0 deletions packages/backend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@ backend.add(import('@backstage/plugin-auth-backend'));
backend.add(import('@backstage/plugin-auth-backend-module-github-provider'));
backend.add(import('@backstage/plugin-badges-backend'));
backend.add(import('@backstage/plugin-catalog-backend/alpha'));
backend.add(
import('@backstage/plugin-catalog-backend-module-scaffolder-entity-model'),
);
// TODO:(awanlin) replace when this is completed: https://github.com/backstage/backstage/pull/20551
backend.add(legacyPlugin('explore', import('./plugins/explore')));
// TODO:(awanlin) update with import when available
backend.add(graphqlPlugin);
backend.add(graphqlModuleCatalog());
backend.add(import('@backstage/plugin-proxy-backend/alpha'));
backend.add(import('@backstage/plugin-scaffolder-backend/alpha'));
backend.add(import('@backstage/plugin-scaffolder-backend-module-github'))
backend.add(import('@backstage/plugin-search-backend/alpha'));
backend.add(import('@backstage/plugin-search-backend-module-catalog/alpha'));
backend.add(import('@backstage/plugin-search-backend-module-explore/alpha'));
Expand Down
Loading

0 comments on commit 39083df

Please sign in to comment.