From e57ba037984a3901ad185f2369e225a4f3d189a4 Mon Sep 17 00:00:00 2001 From: "Reichenbach, Michael" Date: Tue, 10 Oct 2023 13:34:06 +0200 Subject: [PATCH] docs: add example for including local catalog files Signed-off-by: Reichenbach, Michael --- docs/features/software-catalog/configuration.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/features/software-catalog/configuration.md b/docs/features/software-catalog/configuration.md index bd914cc56c..97c75a01ff 100644 --- a/docs/features/software-catalog/configuration.md +++ b/docs/features/software-catalog/configuration.md @@ -44,6 +44,20 @@ When multiple `catalog-info.yaml` files with the same `metadata.name` property are discovered, one will be processed and all others will be skipped. This action is logged for further investigation. +### Local File (`type: file`) Configurations + +In addition to url locations, you can use the `file` location type to bring in content from the local file system. You should only use this for local development, test setups and example data, not for production data. +You are also not able to use placeholders in them like `$text`. You can however reference other files relative to the current file. See the full [catalog example data set here](https://github.com/backstage/backstage/tree/master/packages/catalog-model/examples) for an extensive example. + +Here is an example pulling in the `all.yaml` file from the examples folder. Note the use of `../../` to go up two levels from the current execution path of the backend. This is typically `packages/backend/`. + +```yaml +catalog: + locations: + - type: file + target: ../../examples/all.yaml +``` + ### Integration Processors Integrations may simply provide a mechanism to handle `url` location type for an