Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions assemblies/assembly-configuring-templates.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ include::modules/customizing-templates/proc-searching-and-filtering-software-tem
include::modules/customizing-templates/proc-adding-templates.adoc[leveloffset=+1]
include::modules/customizing-templates/proc-versioning-software-templates.adoc[leveloffset=+1]
include::modules/customizing-templates/proc-enabling-software-template-version-update-notifications.adoc[leveloffset=+1]
include::assembly-tracking-component-origin-and-software-template-version.adoc[leveloffset=+1]

[role="_additional-resources"]
.Additional resources
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
:_mod-docs-content-type: ASSEMBLY

[id="tracking-component-origin-and-software-template-version"]
= Tracking Component origin and Software Template version

Platform engineers use custom actions within the Software Template scaffolding process to establish and track the dependency link between a generated entity (Component or Resource) and its source template. This relationship is called scaffolding provenance.

Platform administrators use the existing custom actions `catalog:scaffolded-from` and `catalog:template:version` in the scaffolder backend module. These actions track the template version and the corresponding entity version, which simplifies lifecycle management.

include::modules/tracking-component-origin-and-software-template-version/proc-configuring-provenance-and-software-template-versioning.adoc[leveloffset=+1]

include::modules/tracking-component-origin-and-software-template-version/proc-viewing-software-template-dependencies.adoc[leveloffset=+1]
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
:_mod-docs-content-type: PROCEDURE

[id="proc-configuring-provenance-and-software-template-versioning_{context}"]
= Configuring provenance and Software Template versioning {product}

As a platform engineer, you must modify the Software Template YAML definition to ensure the required provenance information is added during the scaffolding process.

.Prerequisites

* You have administrator rights to {product}.

.Procedure

. Locate the Software Template object YAML file where you want to add the provenance information and add a step that uses the `catalog:scaffolded-from` action. This action links the resulting catalog entity back to the source template.
. Optional: To track the template version (for example, v1.0 versus v1.5), include the `catalog:template:version` action in the `steps` section.
+
[NOTE]
====
This action reads a version parameter defined in the template and applies it as an annotation to the resulting catalog entity.
====
+
[source,yaml]
----
# Example: Adding the versioning action to the steps section
steps:
- id: create-version-annotation
name: Create Template Version Annotation
action: catalog:template:version
input:
templateVersion: ${{ parameters.version }} # Reads the version parameter
- ... other steps ...
----

. In your `{product} app-config.yaml` file, modify the `catalog.rules` section to include a rule for Software Templates, and configure the `catalog.locations` section to point to the Software Template that you want to add, as shown in the following example:
+
[source,yaml]
----
# ...
catalog:
rules:
- allow: [Template]
locations:
- type: url
target: https://<repository_url>/example-template.yaml
# ...
----
where:

`catalog.rules.allow`:: To allow new Software Templates to be added to the catalog, you must add a `Template` rule.
`catalog.locations.type`:: If you are importing templates from a repository, such as GitHub or GitLab, use the `url` type.
`catalog.locations.target`:: Specify the URL for the template.

.Verification

After creating a component with the updated template, verify the provenance annotations in the resulting Catalog Entity YAML.

. In the {product} navigation menu, go to *Catalog* and locate the newly created catalog component.
. To view the underlying data that links the entity to the template, select the **INSPECT ENTITY** option.
. To verify provenance annotations, complete the following steps:
.. Select the *YAML Raw* or *JSON Raw* view and verify the presence of the data item for the `scaffoldedFrom` link.
.. Optional: If versioning was included, verify the presence of the `backstage.io/template-version` annotation.
+
[NOTE]
====
If you publish the catalog component to an external repository (such as Git), the component file in that repository must also contain the `backstage.io/template-version` annotation.
====
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
:_mod-docs-content-type: PROCEDURE

[id="proc-viewing-software-template-dependencies_{context}"]
= Viewing Software Template dependencies

As a developer, you can track which entities were created from a specific Software Template. When a platform engineer configures provenance on a template, you can quickly identify the complete dependency and impact map of that template by viewing all linked components and resources in the Catalog.

.Procedure
To view all components created from a specific template, complete the following steps:

. In the {product} navigation menu, click *Catalog*, use the filters to find and select the Software Template you wish to inspect.
. In the Software Template detail page, click the *Dependencies* tab. This view lists all catalog entities (components, resources, systems, etc.) that reference this template, including any version information if configured.
3 changes: 3 additions & 0 deletions titles/customizing/master.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ include::assemblies/assembly-about-software-catalogs.adoc[leveloffset=+1]

include::assemblies/assembly-customizing-the-learning-paths.adoc[leveloffset=+1]


include::assemblies/assembly-configuring-the-global-header.adoc[leveloffset=+1]


include::assemblies/assembly-configuring-a-floating-action-button.adoc[leveloffset=+1]


include::assemblies/assembly-configuring-the-quickstarts.adoc[leveloffset=+1]


Expand All @@ -44,4 +46,5 @@ include::assemblies/assembly-customizing-the-homepage.adoc[leveloffset=+1]

include::assemblies/assembly-customizing-the-quick-access-card.adoc[leveloffset=+1]


include::modules/customizing/proc-customizing-rhdh-metadata-card.adoc[leveloffset=+1]