run prettier formatting
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -92,8 +92,7 @@ describe('JenkinsApi', () => {
|
||||
result: 'success',
|
||||
displayName: '#7',
|
||||
fullDisplayName: 'Example jobName » Example Build #7',
|
||||
url:
|
||||
'https://jenkins.example.com/job/example-jobName/job/exampleBuild',
|
||||
url: 'https://jenkins.example.com/job/example-jobName/job/exampleBuild',
|
||||
number: 7,
|
||||
status: 'success',
|
||||
source: {},
|
||||
@@ -280,8 +279,7 @@ describe('JenkinsApi', () => {
|
||||
result: 'success',
|
||||
displayName: '#7',
|
||||
fullDisplayName: 'Example jobName » Example Build #7',
|
||||
url:
|
||||
'https://jenkins.example.com/job/example-jobName/job/exampleBuild/7/',
|
||||
url: 'https://jenkins.example.com/job/example-jobName/job/exampleBuild/7/',
|
||||
number: 7,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -255,9 +255,7 @@ export class JenkinsApiImpl {
|
||||
return scmInfo;
|
||||
}
|
||||
|
||||
private getTestReport(
|
||||
build: JenkinsBuild,
|
||||
): {
|
||||
private getTestReport(build: JenkinsBuild): {
|
||||
total: number;
|
||||
passed: number;
|
||||
skipped: number;
|
||||
|
||||
@@ -20,9 +20,9 @@ import { ConfigReader } from '@backstage/config';
|
||||
import { Entity, EntityName } from '@backstage/catalog-model';
|
||||
|
||||
describe('DefaultJenkinsInfoProvider', () => {
|
||||
const mockCatalog: jest.Mocked<CatalogClient> = ({
|
||||
const mockCatalog: jest.Mocked<CatalogClient> = {
|
||||
getEntityByName: jest.fn(),
|
||||
} as any) as jest.Mocked<CatalogClient>;
|
||||
} as any as jest.Mocked<CatalogClient>;
|
||||
|
||||
const entityRef: EntityName = {
|
||||
kind: 'Component',
|
||||
|
||||
@@ -82,9 +82,8 @@ export class DefaultJenkinsInfoProvider implements JenkinsInfoProvider {
|
||||
}
|
||||
|
||||
// lookup `[jenkinsName#]jobFullName` from entity annotation
|
||||
const jenkinsAndJobName = DefaultJenkinsInfoProvider.getEntityAnnotationValue(
|
||||
entity,
|
||||
);
|
||||
const jenkinsAndJobName =
|
||||
DefaultJenkinsInfoProvider.getEntityAnnotationValue(entity);
|
||||
if (!jenkinsAndJobName) {
|
||||
throw new Error(
|
||||
`Couldn't find jenkins annotation (${
|
||||
|
||||
@@ -75,13 +75,8 @@ export async function createRouter(
|
||||
router.get(
|
||||
'/v1/entity/:namespace/:kind/:name/job/:jobFullName/:buildNumber',
|
||||
async (request, response) => {
|
||||
const {
|
||||
namespace,
|
||||
kind,
|
||||
name,
|
||||
jobFullName,
|
||||
buildNumber,
|
||||
} = request.params;
|
||||
const { namespace, kind, name, jobFullName, buildNumber } =
|
||||
request.params;
|
||||
|
||||
const jenkinsInfo = await jenkinsInfoProvider.getInstance({
|
||||
entityRef: {
|
||||
|
||||
Reference in New Issue
Block a user