Skip to content

Commit 30e454d

Browse files
committed
Templates lifecycle management
1 parent 6a56064 commit 30e454d

File tree

5 files changed

+77
-0
lines changed

5 files changed

+77
-0
lines changed

assemblies/assembly-configuring-templates.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ include::modules/customizing-templates/proc-searching-and-filtering-software-tem
2020
include::modules/customizing-templates/proc-adding-templates.adoc[leveloffset=+1]
2121
include::modules/customizing-templates/proc-versioning-software-templates.adoc[leveloffset=+1]
2222
include::modules/customizing-templates/proc-enabling-software-template-version-update-notifications.adoc[leveloffset=+1]
23+
include::assembly-tracking-component-origin-and-software-template-version.adoc[leveloffset=+1]
2324

2425
[role="_additional-resources"]
2526
.Additional resources
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
:_mod-docs-content-type: ASSEMBLY
2+
3+
[id="tracking-component-origin-and-software-template-version"]
4+
= Tracking Component origin and Software Template version
5+
6+
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.
7+
8+
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.
9+
10+
include::modules/tracking-component-origin-and-software-template-version/proc-configuring-provenance-and-software-template-versioning.adoc[leveloffset=+1]
11+
12+
include::modules/tracking-component-origin-and-software-template-version/proc-viewing-software-template-dependencies.adoc[leveloffset=+1]
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
:_mod-docs-content-type: PROCEDURE
2+
3+
[id="proc-configuring-provenance-and-software-template-versioning_{context}"]
4+
= Configuring provenance and Software Template versioning {product}
5+
6+
As a platform engineer, you must modify the Software Template YAML definition to ensure the required provenance information is added during the scaffolding process.
7+
8+
.Prerequisites
9+
10+
* You have administrator rights to {product}.
11+
12+
.Procedure
13+
14+
. 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.
15+
. Optional: To track the template version (for example, v1.0 versus v1.5), include the `catalog:template:version` action in the `steps` section.
16+
+
17+
[NOTE]
18+
====
19+
This action reads a version parameter defined in the template and applies it as an annotation to the resulting catalog entity.
20+
====
21+
+
22+
[source,yaml]
23+
----
24+
# Example: Adding the versioning action to the steps section
25+
steps:
26+
- id: create-version-annotation
27+
name: Create Template Version Annotation
28+
action: catalog:template:version
29+
input:
30+
templateVersion: ${{ parameters.version }} # Reads the version parameter
31+
- ... other steps ...
32+
----
33+
34+
. Modify the `catalog.rules` and `catalog.locations` sections in your `{product} app-config.yaml` file to register and import the updated Software Template into your {product-very-short} instance.
35+
36+
.Verification
37+
38+
After creating a component with the updated template, verify the provenance annotations in the resulting Catalog Entity YAML.
39+
40+
. In the {product} navigation menu, go to *Catalog* and locate the newly created catalog component.
41+
. To view the underlying data that links the entity to the template, select the **INSPECT ENTITY** option.
42+
. To verify provenance annotations, complete the following steps:
43+
.. Select the *YAML Raw* or *JSON Raw* view and verify the presence of the data item for the `scaffoldedFrom` link.
44+
.. Optional: If versioning was included, verify the presence of the `backstage.io/template-version` annotation.
45+
+
46+
[NOTE]
47+
====
48+
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.
49+
====
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
:_mod-docs-content-type: PROCEDURE
2+
3+
[id="proc-viewing-software-template-dependencies_{context}"]
4+
= Viewing Software Template dependencies
5+
6+
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.
7+
8+
.Procedure
9+
To view all components created from a specific template, complete the following steps:
10+
11+
. In the {product} navigation menu, click *Catalog*, use the filters to find and select the Software Template you wish to inspect.
12+
. 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.

titles/customizing/master.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@ include::assemblies/assembly-about-software-catalogs.adoc[leveloffset=+1]
2525

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

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

3031

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

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

3537

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

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

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

0 commit comments

Comments
 (0)