Initial work on jenkins backend

Signed-off-by: Andrew Shirley <andrew.shirley@sainsburys.co.uk>
Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
Andrew Shirley
2021-04-30 12:33:37 +01:00
committed by blam
parent 12a62ea5f6
commit 449b995261
26 changed files with 1338 additions and 384 deletions
+1
View File
@@ -38,6 +38,7 @@
"@backstage/plugin-catalog-backend": "^0.12.0",
"@backstage/plugin-code-coverage-backend": "^0.1.8",
"@backstage/plugin-graphql-backend": "^0.1.8",
"@backstage/plugin-jenkins-backend": "^0.1.1",
"@backstage/plugin-kubernetes-backend": "^0.3.9",
"@backstage/plugin-kafka-backend": "^0.2.8",
"@backstage/plugin-proxy-backend": "^0.2.9",
+3
View File
@@ -50,6 +50,7 @@ import todo from './plugins/todo';
import graphql from './plugins/graphql';
import app from './plugins/app';
import badges from './plugins/badges';
import jenkins from './plugins/jenkins';
import { PluginEnvironment } from './types';
function makeCreateEnv(config: Config) {
@@ -101,6 +102,7 @@ async function main() {
const graphqlEnv = useHotMemoize(module, () => createEnv('graphql'));
const appEnv = useHotMemoize(module, () => createEnv('app'));
const badgesEnv = useHotMemoize(module, () => createEnv('badges'));
const jenkinsEnv = useHotMemoize(module, () => createEnv('jenkins'));
const apiRouter = Router();
apiRouter.use('/catalog', await catalog(catalogEnv));
@@ -116,6 +118,7 @@ async function main() {
apiRouter.use('/proxy', await proxy(proxyEnv));
apiRouter.use('/graphql', await graphql(graphqlEnv));
apiRouter.use('/badges', await badges(badgesEnv));
apiRouter.use('/jenkins', await jenkins(jenkinsEnv));
apiRouter.use(notFoundHandler());
const service = createServiceBuilder(module)
+31
View File
@@ -0,0 +1,31 @@
/*
* Copyright 2020 Spotify AB
*
* 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,
DummyJenkinsInfoProvider,
} from '@backstage/plugin-jenkins-backend';
import { Router } from 'express';
import { PluginEnvironment } from '../types';
export default async function createPlugin({
logger,
}: PluginEnvironment): Promise<Router> {
return await createRouter({
logger,
jenkinsInfoProvider: new DummyJenkinsInfoProvider(),
});
}