Skip to content

Commit 119aeea

Browse files
pabel-rhthemr0c
authored andcommitted
RHIDP-8630: Added notification during software template version update (redhat-developer#1431)
* Added notification during software template version update * Incorporated Diana's comments * Incorporated Judy's comments
1 parent 822fb8b commit 119aeea

File tree

2 files changed

+74
-0
lines changed

2 files changed

+74
-0
lines changed

assemblies/assembly-configuring-templates.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ include::modules/customizing-templates/proc-creating-a-new-software-component-us
1919
include::modules/customizing-templates/proc-searching-and-filtering-software-templates.adoc[leveloffset=+1]
2020
include::modules/customizing-templates/proc-adding-templates.adoc[leveloffset=+1]
2121
include::modules/customizing-templates/proc-versioning-software-templates.adoc[leveloffset=+1]
22+
include::modules/customizing-templates/proc-enabling-software-template-version-update-notifications.adoc[leveloffset=+1]
2223

2324
[role="_additional-resources"]
2425
.Additional resources
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
:_mod-docs-content-type: PROCEDURE
2+
3+
[id="proc-enabling-software-template-version-update-notifications_{context}"]
4+
= Enabling Software Template version update notifications in {product}
5+
6+
As a platform engineer, you can enable notification alerts for template version updates using the `@backstage-community/plugin-catalog-backend-module-scaffolder-relation-processor` module, an extension to the `catalog-backend` plugin. When enabled, this module automatically notifies component owners whenever the Software Template used to generate their components is updated to a new version.
7+
8+
This functionality uses the `spec.scaffoldedFrom` field in catalog entities. This field links Software Templates to the entities they have scaffolded. By tracking this relationship, the module helps teams stay informed and take advantage of the latest improvements or fixes.
9+
10+
The `plugin-catalog-backend-module-scaffolder-relation-processor` module is disabled by default.
11+
12+
13+
.Prerequisites
14+
15+
* You have installed and configured the Backstage backend notification plugin `@backstage/plugin-notifications-backend`.
16+
* You have installed and configured the Backstage frontend plugin `@backstage/plugin-notifications`.
17+
18+
19+
.Procedure
20+
21+
. To enable the notifications, in your `{product} app-config.yaml` file, add the following codes:
22+
.. In the `dynamicPlugins:frontend` section:
23+
+
24+
[source,yaml]
25+
----
26+
frontend:
27+
backstage.plugin-notifications:
28+
dynamicRoutes:
29+
- importName: NotificationPage
30+
menuItem:
31+
config:
32+
props:
33+
titleCounterEnabled: true
34+
webNotificationsEnabled: false
35+
importName: NotificationsSidebarItem
36+
path: /notifications
37+
----
38+
.. In a new section:
39+
+
40+
[source,yaml]
41+
----
42+
scaffolder:
43+
notifications:
44+
templateUpdate:
45+
enabled: true # Set to false to disable notifications
46+
----
47+
You can also customize the notification title and description as shown in the following code:
48+
+
49+
[source,yaml]
50+
----
51+
scaffolder:
52+
notifications:
53+
templateUpdate:
54+
enabled: true
55+
message:
56+
title: 'Custom title for $ENTITY_DISPLAY_NAME'
57+
description: 'Custom description'
58+
----
59+
+
60+
where:
61+
62+
`enabled`:: Set to `true` to enable the notification. Default value is `false`.
63+
`message:title`:: Enter the notification title.
64+
`message:description`:: Enter the notification description.
65+
66+
[NOTE]
67+
====
68+
Both `message:title` and `message:description` support the template variable `$ENTITY_DISPLAY_NAME`. The system automatically substitutes this variable with the title (or the name, if the title is missing) of the entity scaffolded from the updated template.
69+
====
70+
71+
.Verification
72+
* In your {product} instance, on the left navigation menu, you are able to see `Notifications`, or, if configured, the custom title.
73+
* When you update the version number in the Software Template, you receive a notification.

0 commit comments

Comments
 (0)