You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
= Configure input parameters for Bulk Import Scaffolder template
5
5
6
6
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.
7
7
@@ -13,26 +13,18 @@ The Bulk Import plugin analyzes Git repository information and provides the foll
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`.
18
16
19
17
`name`:: The repository name.
20
-
+
21
-
For example, the `name` is `rhdh-plugins`.
22
18
23
19
`organization`:: The repository owner, which can be a user nickname or organization name.
24
-
+
25
-
For example, the `organization` is `redhat-developer`.
26
20
27
21
`branchName`:: The proposed repository branch. By default, the proposed repository branch is `bulk-import-catalog-entity`.
28
22
29
23
`targetBranchName`:: The default branch of the Git repository.
30
24
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.
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.
8
8
9
9
As an administrator, you can define the Scaffolder template workflow and structure the workflow to do the following:
10
10
11
11
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.
12
12
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.
= Setting up a custom Scaffolder workflow for Bulk Import
5
5
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.
9
7
10
8
You can define various custom tasks, including, but not limited to the following:
11
9
12
10
* Importing existing catalog entities from a repository
13
11
* Creating pull requests for cleanup
14
12
* Calling webhooks for external system integration
15
13
16
-
You can run a custom automation workflow of a Scaffolder template on multiple selected repositories using the bulk import plugin.
17
-
18
14
.Prerequisites
19
15
20
16
* You created a custom Scaffolder template for the Bulk Import plugin.
21
17
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
+
22
25
.Procedure
23
26
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.
@@ -45,19 +46,14 @@ Set the API to 'scaffolder' to trigger the defined workflow for high-fidelity au
45
46
`open-pull-requests`:: This is the default import workflow, which includes the logic for creating pull requests for every selected repository.
46
47
47
48
`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.
48
51
+
49
52
[IMPORTANT]
50
53
====
51
54
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.
52
55
====
53
56
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
-
61
57
.Verification
62
58
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