generated from redhat-developer/new-project-template
-
Notifications
You must be signed in to change notification settings - Fork 55
RHIDP-8630: Added notification during software template version update #1431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
...ing-templates/proc-enabling-software-template-version-update-notifications.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| :_mod-docs-content-type: PROCEDURE | ||
|
|
||
| [id="proc-enabling-software-template-version-update-notifications_{context}"] | ||
| = Enabling Software Template version update notifications in {product} | ||
|
|
||
| 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. | ||
|
|
||
| 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. | ||
|
|
||
| The `plugin-catalog-backend-module-scaffolder-relation-processor` module is disabled by default. | ||
|
|
||
|
|
||
| .Prerequisites | ||
|
|
||
| * You have installed and configured the Backstage backend notification plugin `@backstage/plugin-notifications-backend`. | ||
| * You have installed and configured the Backstage frontend plugin `@backstage/plugin-notifications`. | ||
|
|
||
|
|
||
| .Procedure | ||
|
|
||
| . To enable the notifications, in your `{product} app-config.yaml` file, add the following codes: | ||
| .. In the `dynamicPlugins:frontend` section: | ||
| + | ||
| [source,yaml] | ||
| ---- | ||
| frontend: | ||
| backstage.plugin-notifications: | ||
| dynamicRoutes: | ||
| - importName: NotificationPage | ||
| menuItem: | ||
| config: | ||
| props: | ||
| titleCounterEnabled: true | ||
| webNotificationsEnabled: false | ||
| importName: NotificationsSidebarItem | ||
| path: /notifications | ||
| ---- | ||
| .. In a new section: | ||
| + | ||
| [source,yaml] | ||
| ---- | ||
| scaffolder: | ||
| notifications: | ||
| templateUpdate: | ||
| enabled: true # Set to false to disable notifications | ||
| ---- | ||
| You can also customize the notification title and description as shown in the following code: | ||
| + | ||
| [source,yaml] | ||
| ---- | ||
| scaffolder: | ||
| notifications: | ||
| templateUpdate: | ||
| enabled: true | ||
| message: | ||
| title: 'Custom title for $ENTITY_DISPLAY_NAME' | ||
| description: 'Custom description' | ||
| ---- | ||
| + | ||
| where: | ||
|
|
||
| `enabled`:: Set to `true` to enable the notification. Default value is `false`. | ||
| `message:title`:: Enter the notification title. | ||
| `message:description`:: Enter the notification description. | ||
|
|
||
| [NOTE] | ||
| ==== | ||
| 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. | ||
| ==== | ||
|
|
||
| .Verification | ||
| * In your {product} instance, on the left navigation menu, you are able to see `Notifications`, or, if configured, the custom title. | ||
| * When you update the version number in the Software Template, you receive a notification. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.