Skip to content

Commit 948dd70

Browse files
author
GitHub Actions
committed
Update suggestions
1 parent 7c9ca19 commit 948dd70

File tree

4 files changed

+20
-34
lines changed

4 files changed

+20
-34
lines changed

assemblies/assembly-bulk-importing-from-github.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ include::modules/importing-repositories/concept-bulk-import-scaffolder-template.
1919

2020
include::modules/importing-repositories/procedure-integrating-bulk-import-with-orchestrator-workflows.adoc[leveloffset=+1]
2121

22-
include::modules/importing-repositories/procedure-data-handoff-and-custom-workflow-design.adoc[leveloffset=+1]
22+
include::modules/importing-repositories/concept-data-handoff-and-custom-workflow-design.adoc[leveloffset=+1]

modules/importing-repositories/concept-bulk-import-scaffolder-template.adoc

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
:_mod-docs-content-type: CONCEPT
22

33
[id="bulk-import-scaffolder-template"]
4-
= Understanding Bulk Import Scaffolder template input parameters
4+
= Configure input parameters for Bulk Import Scaffolder template
55

66
As an administrator, you can use the Bulk Import plugin to run a Scaffolder template task with specified parameters, which you must define within the template.
77

@@ -13,26 +13,18 @@ The Bulk Import plugin analyzes Git repository information and provides the foll
1313
----
1414
${gitProviderHost}?owner=${owner}&repo=${repository-name}
1515
----
16-
+
17-
For example, when you run the process, the plugin transforms `https://github.com/redhat-developer/rhdh-plugins` into `github.com?owner=redhat-developer&repo=rhdh-plugins`.
1816

1917
`name`:: The repository name.
20-
+
21-
For example, the `name` is `rhdh-plugins`.
2218

2319
`organization`:: The repository owner, which can be a user nickname or organization name.
24-
+
25-
For example, the `organization` is `redhat-developer`.
2620

2721
`branchName`:: The proposed repository branch. By default, the proposed repository branch is `bulk-import-catalog-entity`.
2822

2923
`targetBranchName`:: The default branch of the Git repository.
3024

31-
`gitProviderHost`:: The Git provider host parsed from the repository URL.
32-
+
33-
For example, for `https://github.com/redhat-developer/rhdh-plugins`, the `gitProviderHost` is `github.com`. You can use this parameter to write `Git-provider-agnostic` templates.
25+
`gitProviderHost`:: The Git provider host parsed from the repository URL. You can use this parameter to write `Git-provider-agnostic` templates.
3426

35-
Using these parameters in a Scaffolder template:
27+
Example of a Scaffolder template:
3628
[source,yaml]
3729
----
3830
parameters:
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
:_mod-docs-content-type: PROCEDURE
1+
:_mod-docs-content-type: CONCEPT
22

33
[id="full-data-handoff-and-custom-workflow-design"]
44

55
= Data handoff and custom workflow design
66

7-
When you configure the Bulk Import plugin by setting the importAPI field to `scaffolder`, the Bulk Import Backend passed all necessary context directly to the Scaffolder API.
7+
When you configure the Bulk Import plugin by setting the importAPI field to `scaffolder`, the Bulk Import Backend passes all necessary context directly to the Scaffolder API.
88

99
As an administrator, you can define the Scaffolder template workflow and structure the workflow to do the following:
1010

1111
Define template parameters to consume input:: Structure the Scaffolder template to receive the repository data as template parameters for the current workflow run. The template must be generic, and not specific to a single repository, so that it can successfully run for every repository in the bulk list.
1212

13-
Automate processing for each repository:: Implement the custom logic needed for a single repository within the template. The Orchestrator iterates through the repository list, launching the template once for each repository and passes only the data for that single repository to the template run. This allows you to automate tasks like creating the `catalog-info.yaml`, running compliance checks, or registering the entity with the catalog.
14-
15-
Centralize import workflow management:: Use the Scaffolder template to define and manage the entire import lifecycle for the repository list, providing you with a single point of management and traceability for the bulk operation. This method offers greater flexibility in defining the import scenario.
13+
Automate processing for each repository:: Implement the custom logic needed for a single repository within the template. The Orchestrator iterates through the repository list, launching the template once for each repository and passes only the data for that single repository to the template run. This allows you to automate tasks such as creating the `catalog-info.yaml`, running compliance checks, or registering the entity with the catalog.

modules/importing-repositories/procedure-integrating-bulk-import-with-orchestrator-workflows.adoc

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,35 @@
33
[id="integrating-bulk-import-with-orchestrator-workflows"]
44
= Setting up a custom Scaffolder workflow for Bulk Import
55

6-
As an administrator, you can create a Scaffolder template that reflects the repository conventions of your organization and add it into the {product} catalog for use by the Bulk Import plugin.
7-
8-
The Scaffolder workflow offers flexibility because the specific import steps are defined by your template content.
6+
As an administrator, you can create a custom Scaffolder template in line with the repository conventions of your organization and add the template into the {product} catalog for use by the Bulk Import plugin on multiple selected repositories.
97

108
You can define various custom tasks, including, but not limited to the following:
119

1210
* Importing existing catalog entities from a repository
1311
* Creating pull requests for cleanup
1412
* Calling webhooks for external system integration
1513

16-
You can run a custom automation workflow of a Scaffolder template on multiple selected repositories using the bulk import plugin.
17-
1814
.Prerequisites
1915

2016
* You created a custom Scaffolder template for the Bulk Import plugin.
2117

18+
* For the {product-very-short} instance to use the Scaffolder functionality, you must run it with the following environment variable enabled:
19+
+
20+
[source,yaml]
21+
----
22+
export NODE_OPTIONS=--no-node-snapshot
23+
----
24+
2225
.Procedure
2326

24-
* Configure your {my-app-config-file} configuration to instruct the Bulk Import plugin to use your custom templates.
25-
+
26-
Optional: You can direct the Bulk Import plugin to hand off the entire list of selected repositories to a custom Orchestrator workflow.
27+
* Configure your {my-app-config-file} configuration to instruct the Bulk Import plugin to use your custom template.
2728
+
2829
To configure the Bulk Import workflow:
2930
+
3031
[source,yaml]
3132
----
3233
bulkImport:
33-
importTemplate: your-template-entity-reference-or-template-name
34+
importTemplate: <your_template_entity_reference_or_template_name>
3435
importAPI: `open-pull-requests` | `scaffolder`;
3536
----
3637
+
@@ -45,19 +46,14 @@ Set the API to 'scaffolder' to trigger the defined workflow for high-fidelity au
4546
`open-pull-requests`:: This is the default import workflow, which includes the logic for creating pull requests for every selected repository.
4647

4748
`scaffolder`:: This workflow uses an import scenario defined in the Scaffolder template to create import jobs. Select this option to use the custom import scenario defined in your Scaffolder template.
49+
50+
Optional: You can direct the Bulk Import plugin to hand off the entire list of selected repositories to a custom Orchestrator workflow.
4851
+
4952
[IMPORTANT]
5053
====
5154
The Scaffolder template must be generic and not specific to a single repository if you want your custom Scaffolder template to run successfully for every repository in the bulk list.
5255
====
5356

54-
* For the {product-very-short} instance to use the Scaffolder functionality, you must run it with the following environment variable enabled:
55-
56-
[source,yaml]
57-
----
58-
export NODE_OPTIONS=--no-node-snapshot
59-
----
60-
6157
.Verification
6258

63-
* The Bulk Import plugin runs the custom Scaffolder template for the list of repositories using the `/task-imports` API endpoint (the `createTaskImportJobs` method).
59+
* The Bulk Import plugin runs the custom Scaffolder template for the list of repositories using the `/task-imports` API endpoint.

0 commit comments

Comments
 (0)