Skip to content

Commit fd182d2

Browse files
authored
Modularlization (#1596)
1 parent 571eead commit fd182d2

File tree

6 files changed

+30
-31
lines changed

6 files changed

+30
-31
lines changed

modules/customizing-templates/ref-creating-templates.adoc

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,18 @@ You can create a Software Template by defining a `Template` object as a YAML fil
77

88
The `Template` object describes the Software Template and its metadata. It also contains required input variables and a list of actions that are executed by the scaffolding service.
99

10-
.`Template` object example
1110
[source,yaml]
1211
----
1312
apiVersion: scaffolder.backstage.io/v1beta3
1413
kind: Template
1514
metadata:
16-
name: template-name # <1>
17-
title: Example template # <2>
18-
description: An example template for v1beta3 scaffolder. # <3>
15+
name: template-name
16+
title: Example template
17+
description: An example template for v1beta3 scaffolder.
1918
spec:
20-
owner: backstage/techdocs-core # <4>
21-
type: service # <5>
22-
parameters: # <6>
19+
owner: backstage/techdocs-core
20+
type: service
21+
parameters:
2322
- title: Fill in some steps
2423
required:
2524
- name
@@ -53,11 +52,14 @@ spec:
5352
entityRef: ${{ steps['register'].output.entityRef }}
5453
# ...
5554
----
56-
<1> Specify a name for the Software Template.
57-
<2> Specify a title for the Software Template. This is the title that is visible on the Software Template tile in the *Self-service* view.
58-
<3> Specify a description for the Software Template. This is the description that is visible on the Software Template tile in the *Self-service* view.
59-
<4> Specify the ownership of the Software Template. The `owner` field provides information about who is responsible for maintaining or overseeing the Software Template within the system or organization. In the provided example, the `owner` field is set to `backstage/techdocs-core`. This means that this Software Template belongs to the `techdocs-core` project in the `backstage` namespace.
60-
<5> Specify the component type. Any string value is accepted for this required field, but your organization should establish a proper taxonomy for these. {product} instances may read this field and behave differently depending on its value. For example, a `website` type component may present tooling in the {product} interface that is specific to just websites.
55+
+
56+
where:
57+
58+
`metadata.name`:: Enter a name for the Software Template.
59+
`metadata.title`:: Enter a title for the Software Template. This is the title that is visible on the Software Template tile in the *Self-service* view.
60+
`metadata.description`:: Enter a description for the Software Template. This is the description that is visible on the Software Template tile in the *Self-service* view.
61+
`spec.owner`:: Enter the ownership of the Software Template. The `owner` field provides information about who is responsible for maintaining or overseeing the Software Template within the system or organization. In the provided example, the `owner` field is set to `backstage/techdocs-core`. This means that this Software Template belongs to the `techdocs-core` project in the `backstage` namespace.
62+
`spec.type`:: Enter the component type. Any string value is accepted for this required field, but your organization should establish a proper taxonomy for these. {product} instances may read this field and behave differently depending on its value. For example, a `website` type component may present tooling in the {product} interface that is specific to just websites.
6163
+
6264
The following values are common for this field:
6365
+
@@ -66,8 +68,8 @@ The following values are common for this field:
6668
`website`:: A website.
6769
`library`:: A software library, such as an npm module or a Java library.
6870
--
69-
<6> Use the `parameters` section to specify parameters for user input that are shown in a form view when a user creates a component by using the Software Template in the {product} console. Each `parameters` subsection, defined by a title and properties, creates a new form page with that definition.
70-
<7> Use the `steps` section to specify steps that are executed in the backend. These steps must be defined by using a unique step ID, a name, and an action. You can view actions that are available on your {product} instance by visiting the URL `\https://<rhdh_url>/create/actions`.
71-
<8> Use the `output` section to specify the structure of output data that is created when the template is used. The `output` section, particularly the `links` subsection, provides valuable references and URLs that users can utilize to access and interact with components that are created from the template.
72-
<9> Provides a reference or URL to the repository associated with the generated component.
73-
<10> Provides a reference or URL that allows users to open the generated component in a catalog or directory where various components are listed.
71+
`spec.parameters`:: Use the `parameters` section to specify parameters for user input that are shown in a form view when a user creates a component by using the Software Template in the {product} console. Each `parameters` subsection, defined by a title and properties, creates a new form page with that definition.
72+
`spec.steps`:: Use the `steps` section to specify steps that are executed in the backend. These steps must be defined by using a unique step ID, a name, and an action. You can view actions that are available on your {product} instance by visiting the URL `\https://<rhdh_url>/create/actions`.
73+
`spec.output`:: Use the `output` section to specify the structure of output data that is created when the template is used. The `output` section, particularly the `links` subsection, provides valuable references and URLs that users can utilize to access and interact with components that are created from the template.
74+
`spec.output.links.title`:: Provides a reference or URL to the repository associated with the generated component.
75+
`spec.output.links.title`:: Provides a reference or URL that allows users to open the generated component in a catalog or directory where various components are listed.

modules/importing-and-using-an-existing-template-for-faster-development/proc-adding-templates.adoc

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,18 @@ You can add an existing Software Template to your {product} instance by using th
1919
# ...
2020
catalog:
2121
rules:
22-
- allow: [Template] # <1>
22+
- allow: [Template]
2323
locations:
24-
- type: url # <2>
25-
target: https://<repository_url>/example-template.yaml # <3>
24+
- type: url
25+
target: https://<repository_url>/example-template.yaml
2626
# ...
2727
----
28-
<1> To allow new Software Templates to be added to the catalog, you must add a `Template` rule.
29-
<2> If you are importing templates from a repository, such as GitHub or GitLab, use the `url` type.
30-
<3> Specify the URL for the template.
28+
+
29+
where:
30+
31+
`catalog.rules.allow`:: Specify the `Template` rule to allow new Software Templates in the catalog.
32+
`catalog.locations.type`:: Specify the `url` type when importing templates from a repository (for example, GitHub or GitLab).
33+
`catalog.locations.target`:: Specify the URL for the template.
3134

3235
.Verification
3336

modules/importing-and-using-an-existing-template-for-faster-development/proc-creating-templates.adoc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ Alternately, you can use the Template Editor to do any of the following actions:
1515

1616
.Procedure
1717

18-
To create a Software Template by using the Template Editor templates, complete the following steps:
19-
2018
. In your {product} navigation menu, click *Catalog > Self-service*. Alternatively, to go to *Self-service* page, in your header menu, click the (+) icon.
2119
. Click the *More options* icon and select *Manage Templates*.
2220
+

modules/importing-and-using-an-existing-template-for-faster-development/proc-searching-and-filtering-software-templates.adoc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ You can search and filter for the Software Template that you want to use to crea
77

88
.Procedure
99

10-
To search and filter for a Software Template, complete the following steps:
11-
1210
. In the {product} navigation menu, click *Catalog* > *Self-service*.
1311
. Type the name of the template you are looking for in the *Search* box.
1412
* If you are looking for templates in a certain category, you can use the *Categories* dropdown.

modules/streamline-software-development-and-management/proc-enabling-and-authorizing-bulk-import-capabilities.adoc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@ This feature is available for GitHub repositories and GitLab projects.
99
.Prerequisites
1010
* For GitHub only: You have {integrating-with-github-book-link}#enabling-github-repository-discovery[enabled GitHub repository discovery].
1111

12-
1312
.Procedure
1413
. The Bulk Import plugins are installed but disabled by default.
1514
To enable the `./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-bulk-import-backend-dynamic` and `./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-bulk-import` plugins, edit your `dynamic-plugins.yaml` with the following content:
1615
+
17-
.`dynamic-plugins.yaml` fragment
1816
[source,yaml]
1917
----
2018
plugins:
@@ -26,7 +24,7 @@ plugins:
2624
+
2725
See {installing-and-viewing-plugins-book-link}[{installing-and-viewing-plugins-book-title}].
2826

29-
. Configure the required `bulk.import` RBAC permission for the users who are not administrators as follows:
27+
. Configure the required `bulk.import` RBAC permission for the users who are not administrators as shown in the following code:
3028
+
3129
.`rbac-policy.csv` fragment
3230
[source,csv,subs="+quotes"]

modules/streamline-software-development-and-management/proc-managing-repositories-after-import-to-stay-organized.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ You can oversee and manage the Git repositories that are imported to the {produc
1010

1111

1212
.Procedure
13-
. Click *Bulk Import* in the left sidebar to display all the current GitHub repositories and GitLab projects that are being tracked as Import jobs, along with their status.
13+
* Click *Bulk Import* in the left sidebar to display all the current GitHub repositories and GitLab projects that are being tracked as Import jobs, along with their status.
1414

1515
Added:: The Git repository is added to the {product-short} catalog after the import pull request is merged or if the Git repository already contained a `catalog-info.yaml` file during the bulk import.
1616
Note that it may take a few minutes for the entities to be available in the catalog.

0 commit comments

Comments
 (0)