feat(catalog-backend): add the new kind to the validation workflow
Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
@@ -52,6 +52,8 @@ export type {
|
||||
} from './SystemEntityV1alpha1';
|
||||
export { templateEntityV1beta2Validator } from './TemplateEntityV1beta2';
|
||||
export type { TemplateEntityV1beta2 } from './TemplateEntityV1beta2';
|
||||
export { templateEntityV1beta3Validator } from './TemplateEntityV1beta3';
|
||||
export type { TemplateEntityV1beta3 } from './TemplateEntityV1beta3';
|
||||
export type { KindValidator } from './types';
|
||||
export { userEntityV1alpha1Validator } from './UserEntityV1alpha1';
|
||||
export type {
|
||||
|
||||
@@ -48,6 +48,8 @@ import {
|
||||
systemEntityV1alpha1Validator,
|
||||
TemplateEntityV1beta2,
|
||||
templateEntityV1beta2Validator,
|
||||
TemplateEntityV1beta3,
|
||||
templateEntityV1beta3Validator,
|
||||
UserEntity,
|
||||
userEntityV1alpha1Validator,
|
||||
} from '@backstage/catalog-model';
|
||||
@@ -61,6 +63,9 @@ export class BuiltinKindsEntityProcessor implements CatalogProcessor {
|
||||
resourceEntityV1alpha1Validator,
|
||||
groupEntityV1alpha1Validator,
|
||||
locationEntityV1alpha1Validator,
|
||||
templateEntityV1beta3Validator,
|
||||
|
||||
// TODO: remove once beta3 is stable
|
||||
templateEntityV1beta2Validator,
|
||||
userEntityV1alpha1Validator,
|
||||
systemEntityV1alpha1Validator,
|
||||
@@ -134,7 +139,7 @@ export class BuiltinKindsEntityProcessor implements CatalogProcessor {
|
||||
* Emit relations for the Template kind
|
||||
*/
|
||||
if (entity.kind === 'Template') {
|
||||
const template = entity as TemplateEntityV1beta2;
|
||||
const template = entity as TemplateEntityV1beta2 | TemplateEntityV1beta3;
|
||||
doEmit(
|
||||
template.spec.owner,
|
||||
{ defaultKind: 'Group', defaultNamespace: selfRef.namespace },
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
apiVersion: backstage.io/v1beta3
|
||||
kind: Template
|
||||
metadata:
|
||||
name: test-v1beta3
|
||||
title: Test v1beta3
|
||||
description: Test V1 Beta 3 Demo Templates
|
||||
spec:
|
||||
type: website
|
||||
parameters:
|
||||
- name: Enter some stuff
|
||||
description: Enter some stuff
|
||||
properties:
|
||||
inputString:
|
||||
type: string
|
||||
inputObject:
|
||||
type: object
|
||||
properties:
|
||||
first:
|
||||
type: string
|
||||
second:
|
||||
type: number
|
||||
steps:
|
||||
- id: debug
|
||||
name: Debug
|
||||
action: debug:log
|
||||
input:
|
||||
message: ${{ parameters.inputString }}
|
||||
extra: ${{ parameters.inputObject }}
|
||||
|
||||
|
||||
@@ -39,10 +39,15 @@ export function createDebugLogAction() {
|
||||
title: 'List all files in the workspace, if true.',
|
||||
type: 'boolean',
|
||||
},
|
||||
extra: {
|
||||
title: 'Extra info',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
async handler(ctx) {
|
||||
ctx.logger.info(JSON.stringify(ctx.input, null, 2));
|
||||
|
||||
if (ctx.input?.message) {
|
||||
ctx.logStream.write(ctx.input.message);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user