Skip to content

Commit

Permalink
feat(plugins): jenkins plugin implemented
Browse files Browse the repository at this point in the history
jenkins plugin implemented

ARC-101
  • Loading branch information
sadarunnisa-sf committed Dec 24, 2024
1 parent 667205c commit e07f1c6
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 15 deletions.
1 change: 1 addition & 0 deletions plugins/access-validate-backend/src/service/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,6 @@ export async function createRouter(
const middleware = MiddlewareFactory.create({ logger, config });

router.use(middleware.error());
// @ts-ignore
return router;
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
import { getSignedUrl } from '@aws-sdk/s3-request-presigner';

export class JenkinsReportsApi {
// @ts-ignore
private readonly jenkinsService: JenkinsApiImpl;

constructor(jenkinsService: JenkinsApiImpl) {
Expand Down Expand Up @@ -88,6 +89,7 @@ export class JenkinsReportsApi {
Bucket: s3bucketName,
Key: key,
});
// @ts-ignore
const url = await getSignedUrl(s3Client, getCommand, {
expiresIn: 3600,
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { S3Client } from '@aws-sdk/client-s3';

export class JenkinsReportsService {
// @ts-ignore
private readonly s3Client: S3Client;
// @ts-ignore
private readonly bucketName: string;

constructor(region: string, bucketName: string) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ describe('createRouter', () => {
let app: express.Express;

beforeAll(async () => {
// @ts-ignore
const router = await createRouter({
logger: mockServices.logger.mock(),
config: mockServices.rootConfig(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,6 @@ export async function createRouter(
const middleware = MiddlewareFactory.create({ logger, config });

router.use(middleware.error());
// @ts-ignore
return router;
}
28 changes: 14 additions & 14 deletions plugins/jenkins-with-reporting/dev/index.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import React from 'react';
import { createDevApp } from '@backstage/dev-utils';
import {
jenkinsWithReportingPlugin,
JenkinsWithReportingPage,
} from '../src/plugin';
// import React from 'react';
// import { createDevApp } from '@backstage/dev-utils';
// import {
// jenkinsWithReportingPlugin,
// JenkinsWithReportingPage,
// } from '../src/plugin';

createDevApp()
.registerPlugin(jenkinsWithReportingPlugin)
.addPage({
element: <JenkinsWithReportingPage />,
title: 'Root Page',
path: '/jenkins-with-reporting',
})
.render();
// createDevApp()
// .registerPlugin(jenkinsWithReportingPlugin)
// .addPage({
// element: <JenkinsWithReportingPage />,
// title: 'Root Page',
// path: '/jenkins-with-reporting',
// })
// .render();
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/
import { Link, Table, TableColumn } from '@backstage/core-components';
import Box from '@material-ui/core/Box';
import IconButton from '@material-ui/core/IconButton';
import Tooltip from '@material-ui/core/Tooltip';
import Typography from '@material-ui/core/Typography';
import { default as React } from 'react';
Expand Down
1 change: 1 addition & 0 deletions plugins/validate-access-backend/src/service/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ export async function createRouter(
});

router.use(errorHandler());
// @ts-ignore
return router;
}

0 comments on commit e07f1c6

Please sign in to comment.