remove plugins part 1
Some checks are pending
Create and publish a Docker image / docker (push) Waiting to run

This commit is contained in:
Christopher Hase 2025-02-24 14:24:08 +01:00
parent a2df1adeb3
commit f96c8ce808
10 changed files with 37403 additions and 26761 deletions

View file

@ -24,7 +24,10 @@ WORKDIR /app
COPY --from=packages --chown=node:node /app .
RUN --mount=type=cache,target=/home/node/.cache/yarn,sharing=locked,uid=1000,gid=1000 \
yarn install --frozen-lockfile --network-timeout 600000
yarn install --ignore-engines --network-timeout 600000
#--ignore-engines
#yarn install --frozen-lockfile --network-timeout 600000
COPY --chown=node:node . .
@ -83,7 +86,9 @@ WORKDIR /app
COPY --from=build --chown=node:node /app/yarn.lock /app/package.json /app/packages/backend/dist/skeleton/ ./
RUN --mount=type=cache,target=/home/node/.cache/yarn,sharing=locked,uid=1000,gid=1000 \
yarn install --frozen-lockfile --production --network-timeout 600000
yarn install --production --network-timeout 600000
#yarn install --frozen-lockfile --production --network-timeout 600000
# Copy the built packages from the build stage
COPY --from=build --chown=node:node /app/packages/backend/dist/bundle/ ./

View file

@ -14,6 +14,8 @@
"lint": "backstage-cli package lint"
},
"dependencies": {
"@backstage-community/plugin-github-actions": "^0.6.16",
"@backstage-community/plugin-tech-radar": "^0.7.4",
"@backstage/app-defaults": "^1.5.7",
"@backstage/catalog-model": "^1.5.0",
"@backstage/cli": "^0.26.10",
@ -39,10 +41,6 @@
"@backstage/plugin-techdocs-react": "^1.2.5",
"@backstage/plugin-user-settings": "^0.8.8",
"@backstage/theme": "^0.5.6",
"@internal/plugin-apache-spark": "^0.1.0",
"@internal/plugin-argo-workflows": "^0.1.0",
"@internal/plugin-cnoe-ui": "^0.1.0",
"@internal/plugin-terraform": "^0.1.0",
"@material-ui/core": "^4.12.2",
"@material-ui/icons": "^4.9.1",
"@roadiehq/backstage-plugin-argo-cd": "^2.5.1",
@ -51,9 +49,7 @@
"react-dom": "^18.0.2",
"react-router": "^6.3.0",
"react-router-dom": "^6.3.0",
"react-use": "^17.2.4",
"@backstage-community/plugin-github-actions": "^0.6.16",
"@backstage-community/plugin-tech-radar": "^0.7.4"
"react-use": "^17.2.4"
},
"devDependencies": {
"@backstage/test-utils": "^1.5.7",

View file

@ -33,19 +33,19 @@ import { AppRouter, FlatRoutes } from '@backstage/core-app-api';
import { CatalogGraphPage } from '@backstage/plugin-catalog-graph';
import { RequirePermission } from '@backstage/plugin-permission-react';
import { catalogEntityCreatePermission } from '@backstage/plugin-catalog-common/alpha';
import LightIcon from '@material-ui/icons/WbSunny';
import {
//import LightIcon from '@material-ui/icons/WbSunny';
/*import {
CNOEHomepage,
cnoeLightTheme,
cnoeDarkTheme,
} from '@internal/plugin-cnoe-ui';
} from '@internal/plugin-cnoe-ui';*/
import {configApiRef, useApi} from "@backstage/core-plugin-api";
import { ArgoWorkflowsPage } from '@internal/plugin-argo-workflows';
import { ApacheSparkPage } from '@internal/plugin-apache-spark';
import {
//import { ArgoWorkflowsPage } from '@internal/plugin-argo-workflows';
//import { ApacheSparkPage } from '@internal/plugin-apache-spark';
/*import {
UnifiedThemeProvider
} from "@backstage/theme";
import { TerraformPluginPage } from '@internal/plugin-terraform';
} from "@backstage/theme";*/
//import { TerraformPluginPage } from '@internal/plugin-terraform';
const app = createApp({
apis,
@ -85,7 +85,7 @@ const app = createApp({
catalogIndex: catalogPlugin.routes.catalogIndex,
});
},
themes: [
/*themes: [
{
id: 'cnoe-light-theme',
title: 'Light Theme',
@ -104,13 +104,13 @@ const app = createApp({
<UnifiedThemeProvider theme={cnoeDarkTheme} children={children} />
),
},
],
],*/
});
const routes = (
<FlatRoutes>
<Route path="/" element={<Navigate to="home" />} />
<Route path="/home" element={<CNOEHomepage />} />
{/*<Route path="/home" element={<CNOEHomepage />} />*/}
<Route path="/catalog" element={<CatalogIndexPage />} />
<Route
path="/catalog/:namespace/:kind/:name"
@ -146,9 +146,9 @@ const routes = (
</Route>
<Route path="/settings" element={<UserSettingsPage />} />
<Route path="/catalog-graph" element={<CatalogGraphPage />} />
<Route path="/argo-workflows" element={<ArgoWorkflowsPage />} />
<Route path="/apache-spark" element={<ApacheSparkPage />} />
<Route path="/terraform" element={<TerraformPluginPage />} />
{/*<Route path="/argo-workflows" element={<ArgoWorkflowsPage />} />*/}
{/*<Route path="/apache-spark" element={<ApacheSparkPage />} />*/}
{/*<Route path="/terraform" element={<TerraformPluginPage />} />*/}
</FlatRoutes>
);

View file

@ -58,12 +58,12 @@ import {
isArgocdAvailable
} from '@roadiehq/backstage-plugin-argo-cd';
import {
/*import {
EntityArgoWorkflowsOverviewCard,
isArgoWorkflowsAvailable,
} from '@internal/plugin-argo-workflows';
import {ApacheSparkPage, isApacheSparkAvailable} from "@internal/plugin-apache-spark";
import { isTerraformAvailable, TerraformPluginPage } from '@internal/plugin-terraform';
} from '@internal/plugin-argo-workflows';*/
//import {ApacheSparkPage, isApacheSparkAvailable} from "@internal/plugin-apache-spark";
//import { isTerraformAvailable, TerraformPluginPage } from '@internal/plugin-terraform';
const techdocsContent = (
<EntityTechdocsContent>
@ -75,9 +75,9 @@ const techdocsContent = (
const cicdContent = (
<EntitySwitch>
<EntitySwitch.Case if={e => isArgoWorkflowsAvailable(e)}>
{/*<EntitySwitch.Case if={e => isArgoWorkflowsAvailable(e)}>
<EntityArgoWorkflowsOverviewCard title="Workflows"/>
</EntitySwitch.Case>
</EntitySwitch.Case>*/}
<EntitySwitch.Case>
<EmptyState
@ -139,13 +139,13 @@ const overviewContent = (
</Grid>
</EntitySwitch.Case>
</EntitySwitch>
<EntitySwitch>
{/*<EntitySwitch>
<EntitySwitch.Case if={e => isTerraformAvailable(e)}>
<Grid item md={6}>
<TerraformPluginPage />
</Grid>
</EntitySwitch.Case>
</EntitySwitch>
</EntitySwitch>*/}
<Grid item md={6} xs={12}>
<EntityCatalogGraphCard variant="gridItem" height={400} />
</Grid>
@ -169,9 +169,9 @@ const serviceEntityPage = (
<EntityKubernetesContent refreshIntervalMs={30000} />
</EntityLayout.Route>
<EntityLayout.Route path="/apache-spark" title="Spark" if={isApacheSparkAvailable}>
{/*<EntityLayout.Route path="/apache-spark" title="Spark" if={isApacheSparkAvailable}>
<ApacheSparkPage />
</EntityLayout.Route>
</EntityLayout.Route>*/}
<EntityLayout.Route path="/api" title="API">
<Grid container spacing={3} alignItems="stretch">

View file

@ -1,5 +1,5 @@
import { createBackend } from '@backstage/backend-defaults';
import { authModuleKeycloakOIDCProvider } from './plugins/auth';
//import { authModuleKeycloakOIDCProvider } from './plugins/auth';
import { cnoeScaffolderActions } from './plugins/scaffolder';
import { legacyPlugin } from '@backstage/backend-common';
@ -27,13 +27,13 @@ backend.add(import('@backstage/plugin-search-backend-module-techdocs/alpha'));
backend.add(import('@backstage/plugin-kubernetes-backend/alpha'));
// non-core plugins
// roadie plugins
backend.add(import('@roadiehq/scaffolder-backend-module-utils/new-backend'));
//backend.add(import('@roadiehq/scaffolder-backend-module-utils/new-backend')); //TODO: incompatible? why??
backend.add(legacyPlugin('argocd', import('./plugins/argocd')));
backend.add(
import('@roadiehq/scaffolder-backend-module-http-request/new-backend'),
);
// cnoe plugins
backend.add(authModuleKeycloakOIDCProvider);
//backend.add(authModuleKeycloakOIDCProvider);
backend.add(cnoeScaffolderActions);
backend.add(import('@internal/backstage-plugin-terraform-backend'));

View file

@ -1,4 +1,4 @@
import {
/*import {
DEFAULT_NAMESPACE,
stringifyEntityRef,
} from '@backstage/catalog-model';
@ -12,9 +12,9 @@ import {
import {
oidcAuthenticator,
OidcAuthResult,
} from '@backstage/plugin-auth-backend-module-oidc-provider';
} from '@backstage/plugin-auth-backend-module-oidc-provider';*/
export const authModuleKeycloakOIDCProvider = createBackendModule({
/*export const authModuleKeycloakOIDCProvider = createBackendModule({
pluginId: 'auth',
moduleId: 'keycloak-oidc',
register(reg) {
@ -65,4 +65,4 @@ export const authModuleKeycloakOIDCProvider = createBackendModule({
},
});
},
});
});*/

View file

@ -2,7 +2,7 @@ import {
coreServices,
createBackendPlugin,
} from '@backstage/backend-plugin-api';
import { createRouter } from './service/router';
//import { createRouter } from './service/router';
/**
* terraformPlugin backend plugin
@ -20,18 +20,18 @@ export const terraformPlugin = createBackendPlugin({
},
async init({
httpRouter,
logger,
config,
//logger,
//config,
}) {
httpRouter.addAuthPolicy({
path: '/health',
allow: 'unauthenticated',
});
httpRouter.use(await createRouter({
/*httpRouter.use(await createRouter({
config,
logger,
}));
}));*/
},
});
},

View file

@ -1,14 +1,14 @@
import { getVoidLogger } from '@backstage/backend-common';
import { ConfigApi } from "@backstage/core-plugin-api"
import express from 'express';
import request from 'supertest';
//import { getVoidLogger } from '@backstage/backend-common';
//import { ConfigApi } from "@backstage/core-plugin-api"
//import express from 'express';
//import request from 'supertest';
import { createRouter } from './router';
//import { createRouter } from './router';
describe('createRouter', () => {
let app: express.Express;
//let app: express.Express;
const mockConfig: jest.Mocked<ConfigApi> = {
/*const mockConfig: jest.Mocked<ConfigApi> = {
has: jest.fn(),
keys: jest.fn(),
get: jest.fn(),
@ -25,26 +25,26 @@ describe('createRouter', () => {
getOptionalString: jest.fn(),
getStringArray: jest.fn(),
getOptionalStringArray: jest.fn(),
}
}*/
beforeAll(async () => {
const router = await createRouter({
/*const router = await createRouter({
logger: getVoidLogger(),
config: mockConfig,
});
app = express().use(router);
app = express().use(router);*/
});
beforeEach(() => {
jest.resetAllMocks();
});
describe('GET /health', () => {
/*describe('GET /health', () => {
it('returns ok', async () => {
const response = await request(app).get('/health');
expect(response.status).toEqual(200);
expect(response.body).toEqual({ status: 'ok' });
});
});
});*/
});

View file

@ -1,26 +1,26 @@
import { errorHandler } from '@backstage/backend-common';
//import { errorHandler } from '@backstage/backend-common';
import { LoggerService } from '@backstage/backend-plugin-api';
import { Config } from '@backstage/config';
import express from 'express';
/*import express from 'express';
import Router from 'express-promise-router';
import {DefaultAwsCredentialsManager} from '@backstage/integration-aws-node';
import {S3Client, ListObjectsV2Command, GetObjectCommand} from "@aws-sdk/client-s3";
import * as fs from 'fs';
import * as fs from 'fs';*/
const {inflate} = require('pako');
//const {inflate} = require('pako');
type ListObjectsInput = {
/*type ListObjectsInput = {
Bucket: string,
Prefix: string,
ContinuationToken?: string,
};
};*/
export interface RouterOptions {
logger: LoggerService;
config: Config,
}
export async function createRouter(
/*export async function createRouter(
options: RouterOptions,
): Promise<express.Router> {
const {logger, config} = options;
@ -125,4 +125,4 @@ export async function createRouter(
router.use(errorHandler());
return router;
}
}*/

64033
yarn.lock

File diff suppressed because it is too large Load diff