chore: reset some files

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2023-01-31 13:46:07 +01:00
parent 25d25778d0
commit 468cbbf55f
4 changed files with 1 additions and 74 deletions
-6
View File
@@ -255,12 +255,6 @@ catalog:
# Backstage example entities
- type: file
target: ../catalog-model/examples/all.yaml
- type: file
target: ./test-template.yaml
rules:
- allow: [Template]
# Backstage example groups and users
- type: file
target: ../catalog-model/examples/acme-corp.yaml
+1 -27
View File
@@ -15,12 +15,7 @@
*/
import { CatalogClient } from '@backstage/catalog-client';
import { ScmIntegrations } from '@backstage/integration';
import {
createRouter,
createTemplateAction,
createBuiltinActions,
} from '@backstage/plugin-scaffolder-backend';
import { createRouter } from '@backstage/plugin-scaffolder-backend';
import { Router } from 'express';
import type { PluginEnvironment } from '../types';
@@ -31,26 +26,6 @@ export default async function createPlugin(
discoveryApi: env.discovery,
});
const defaultActions = createBuiltinActions({
catalogClient,
reader: env.reader,
config: env.config,
integrations: ScmIntegrations.fromConfig(env.config),
});
const delayAction = createTemplateAction({
id: 'mock:delay',
async handler(ctx) {
const interval = setInterval(
() => ctx.logger.info('Writing something', new Date().toISOString()),
1000,
);
await new Promise(resolve => setTimeout(resolve, 5000));
clearTimeout(interval);
},
});
return await createRouter({
logger: env.logger,
config: env.config,
@@ -59,6 +34,5 @@ export default async function createPlugin(
reader: env.reader,
identity: env.identity,
scheduler: env.scheduler,
actions: [...defaultActions, delayAction],
});
}
-37
View File
@@ -1,37 +0,0 @@
apiVersion: scaffolder.backstage.io/v1beta3
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-template
kind: Template
metadata:
name: example-delay-tempalte
title: Delay template
description: An example template for the scaffolder that creates a simple Node.js service
spec:
type: service
parameters: []
steps:
- id: delay1
name: Delay 1
action: mock:delay
- id: delay2
name: Delay 2
action: mock:delay
- id: delay3
name: Delay 3
action: mock:delay
- id: delay4
name: Delay 4
action: mock:delay
- id: delay5
if: true
name: Delay 5
action: mock:delay
- id: delay6
name: Delay 6
action: mock:delay
@@ -1,5 +1 @@
# Backstage override configuration for your local development environment
catalog:
locations:
- type: file
target: ./test-template.yaml