From 07ec177dbf826971a0c6e82883b28a790c2fe436 Mon Sep 17 00:00:00 2001 From: blam Date: Thu, 13 Jan 2022 14:50:42 +0100 Subject: [PATCH] chore: restore dev-ops as we're gonna fix it Signed-off-by: blam --- packages/backend/package.json | 1 + packages/backend/src/index.ts | 3 +++ packages/backend/src/plugins/azure-devops.ts | 26 ++++++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 packages/backend/src/plugins/azure-devops.ts diff --git a/packages/backend/package.json b/packages/backend/package.json index 626b496509..f204659789 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -32,6 +32,7 @@ "@backstage/integration": "^0.7.0", "@backstage/plugin-app-backend": "^0.3.21", "@backstage/plugin-auth-backend": "^0.6.0", + "@backstage/plugin-azure-devops-backend": "^0.2.6", "@backstage/plugin-badges-backend": "^0.1.14", "@backstage/plugin-catalog-backend": "^0.19.4", "@backstage/plugin-code-coverage-backend": "^0.1.18", diff --git a/packages/backend/src/index.ts b/packages/backend/src/index.ts index b765df38f6..1942c36ad1 100644 --- a/packages/backend/src/index.ts +++ b/packages/backend/src/index.ts @@ -40,6 +40,7 @@ import { Config } from '@backstage/config'; import healthcheck from './plugins/healthcheck'; import { metricsInit, metricsHandler } from './metrics'; import auth from './plugins/auth'; +import azureDevOps from './plugins/azure-devops'; import catalog from './plugins/catalog'; import codeCoverage from './plugins/codecoverage'; import kubernetes from './plugins/kubernetes'; @@ -116,6 +117,7 @@ async function main() { ); const scaffolderEnv = useHotMemoize(module, () => createEnv('scaffolder')); const authEnv = useHotMemoize(module, () => createEnv('auth')); + const azureDevOpsEnv = useHotMemoize(module, () => createEnv('azure-devops')); const proxyEnv = useHotMemoize(module, () => createEnv('proxy')); const rollbarEnv = useHotMemoize(module, () => createEnv('rollbar')); const searchEnv = useHotMemoize(module, () => createEnv('search')); @@ -139,6 +141,7 @@ async function main() { apiRouter.use('/scaffolder', await scaffolder(scaffolderEnv)); apiRouter.use('/tech-insights', await techInsights(techInsightsEnv)); apiRouter.use('/auth', await auth(authEnv)); + apiRouter.use('/azure-devops', await azureDevOps(azureDevOpsEnv)); apiRouter.use('/search', await search(searchEnv)); apiRouter.use('/techdocs', await techdocs(techdocsEnv)); apiRouter.use('/todo', await todo(todoEnv)); diff --git a/packages/backend/src/plugins/azure-devops.ts b/packages/backend/src/plugins/azure-devops.ts new file mode 100644 index 0000000000..4120e655ed --- /dev/null +++ b/packages/backend/src/plugins/azure-devops.ts @@ -0,0 +1,26 @@ +/* + * Copyright 2020 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { createRouter } from '@backstage/plugin-azure-devops-backend'; +import { Router } from 'express'; +import type { PluginEnvironment } from '../types'; + +export default function createPlugin({ + logger, + config, +}: PluginEnvironment): Promise { + return createRouter({ logger, config }); +}