Skip to content

Commit 50b15c7

Browse files
authored
Update README.md of scaffolder-relation-processor (#5136)
* docs: update README.md of relation processor Add a note to clarify the relation between this plugin and scaffolder-backend-module-annotator. Signed-off-by: Diana Janickova <[email protected]> * fix: run prettier Signed-off-by: Diana Janickova <[email protected]> * mod: update workspace level README.md Signed-off-by: Diana Janickova <[email protected]> * mod: generate changeset Signed-off-by: Diana Janickova <[email protected]> --------- Signed-off-by: Diana Janickova <[email protected]>
1 parent 361497c commit 50b15c7

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@backstage-community/plugin-catalog-backend-module-scaffolder-relation-processor': patch
3+
---
4+
5+
Added documentation note clarifying that the plugin only processes existing spec.scaffoldedFrom fields.
Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
# [Backstage](https://backstage.io)
1+
# Scaffolder Relation Processor
22

3-
This is your newly scaffolded Backstage App, Good Luck!
3+
This workspace contains a plugin that creates relations between scaffolder templates and the catalog entities they generate.
44

5-
To start the app, run:
5+
## Plugins
66

7-
```sh
8-
yarn install
9-
yarn start
10-
```
7+
- [catalog-backend-module-scaffolder-relation-processor](./plugins/catalog-backend-module-scaffolder-relation-processor/README.md): Backend module that provides a catalog entity processor to create relations based on the `spec.scaffoldedFrom` field, linking scaffolder templates to their generated entities.

workspaces/scaffolder-relation-processor/plugins/catalog-backend-module-scaffolder-relation-processor/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ backend.start();
3232

3333
Catalog entities containing the `spec.scaffoldedFrom` field will have a relation link be formed between it and the `template` corresponding to the entity ref in the `spec.scaffoldedFrom` field.
3434

35+
> [!NOTE]
36+
> This plugin only processes entities that **already have** the `spec.scaffoldedFrom` field. It does not add this field to entities. If you are creating new entities through scaffolder templates and expect them to have scaffold relations, you need to ensure that the `spec.scaffoldedFrom` field is added during the scaffolding process.
37+
> For automatic addition of the `spec.scaffoldedFrom` field, consider using the [`scaffolder-backend-module-annotator`](https://github.com/backstage/community-plugins/tree/main/workspaces/scaffolder-backend-module-annotator) plugin, which provides a `catalog:scaffolded-from` action that can be used in your scaffolder templates to automatically add this field to generated entities.
38+
3539
This link can be viewed in the `relations` field of the Raw YAML view of a catalog entity when inspecting an entity. In the entity with the `spec.scaffoldedFrom` field, the relation type is `scaffoldedFrom` with a target pointing to the value of the `spec.scaffoldedFrom` field. Conversely, for the target template, it will have a relation type of `ScaffolderOf` with a target pointing to the entity with the `spec.scaffoldedFrom` field.
3640

3741
These relations should also appear on the `EntityCatalogGraphView` component from the `@backstage/plugin-catalog-graph` package (only if the entity corresponding to the entity ref exists in the catalog).

0 commit comments

Comments
 (0)