generated from redhat-developer/new-project-template
-
Notifications
You must be signed in to change notification settings - Fork 55
RHIDP-8632: Update the Bulk Import Plugin to Integrate with Existing Backstage Templates and Orchestrator Workflows #1444
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
Gerry-Forde
merged 20 commits into
redhat-developer:main
from
jmagak:RHIDP-8632-Update-the-Bulk-Import-Plugin-to-Integrate-with-Existing-Backstage-Templates-and-Orchestrator-Workflows
Oct 24, 2025
+133
−0
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
11160e5
Bulk import
invalid-email-address 67841cf
Bulk Import plugin
invalid-email-address ea94d38
Bulk Import plugin
invalid-email-address b7ea605
Update bulk import
invalid-email-address f6f19d4
Update bulk import
invalid-email-address 4226908
Update bulk import
invalid-email-address 1d63097
Update bulk import
invalid-email-address fa8c004
Add a new module
invalid-email-address 2ea82c0
Apply suggestions
invalid-email-address 8431a4f
Apply suggestions
invalid-email-address 523f779
Apply peers suggestions
invalid-email-address efa6a53
Apply new suggestion
invalid-email-address 8eb9423
Apply suggestions
invalid-email-address a0413df
Update suggestions
invalid-email-address 2fc23b0
Update suggestions
invalid-email-address 71d73fc
Apply suggestions
invalid-email-address 25b8016
Apply suggestions
invalid-email-address ae6d324
Apply suggestions
invalid-email-address 9d5bb47
Merge branch 'main' into RHIDP-8632-Update-the-Bulk-Import-Plugin-to-…
jmagak 3d25c2a
Apply suggestions
invalid-email-address 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
58 changes: 58 additions & 0 deletions
58
modules/importing-repositories/concept-bulk-import-scaffolder-template.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,58 @@ | ||
| :_mod-docs-content-type: CONCEPT | ||
|
|
||
| [id="bulk-import-scaffolder-template"] | ||
| = Input parameters for Bulk Import Scaffolder template | ||
|
|
||
| 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. | ||
|
|
||
| The Bulk Import plugin analyzes Git repository information and provides the following parameters for the Scaffolder template task: | ||
|
|
||
| `repoUrl`:: Normalized repository URL in the following format: | ||
| + | ||
| [source,yaml] | ||
| ---- | ||
| ${gitProviderHost}?owner=${owner}&repo=${repository-name} | ||
| ---- | ||
|
|
||
| `name`:: The repository name. | ||
|
|
||
| `organization`:: The repository owner, which can be a user nickname or organization name. | ||
|
|
||
| `branchName`:: The proposed repository branch. By default, the proposed repository branch is `bulk-import-catalog-entity`. | ||
|
|
||
| `targetBranchName`:: The default branch of the Git repository. | ||
|
|
||
| `gitProviderHost`:: The Git provider host parsed from the repository URL. You can use this parameter to write `Git-provider-agnostic` templates. | ||
|
|
||
| Example of a Scaffolder template: | ||
| [source,yaml] | ||
| ---- | ||
| parameters: | ||
| - title: Repository details | ||
| required: | ||
| - repoUrl | ||
| - branchName | ||
| - targetBranchName | ||
| - name | ||
| - organization | ||
| properties: | ||
| repoUrl: | ||
| type: string | ||
| title: Repository URL (Backstage format) | ||
| description: github.com?owner=Org&repo=repoName | ||
| organization: | ||
| type: string | ||
| title: Owner of the repository | ||
| name: | ||
| type: string | ||
| title: Name of the repository | ||
| branchName: | ||
| type: string | ||
| title: Branch to add the catalog entity to | ||
| targetBranchName: | ||
| type: string | ||
| title: Branch to target the PR/MR to | ||
| gitProviderHost: | ||
| type: string | ||
| title: Git provider host | ||
| ---- |
13 changes: 13 additions & 0 deletions
13
...les/importing-repositories/concept-data-handoff-and-custom-workflow-design.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,13 @@ | ||
| :_mod-docs-content-type: CONCEPT | ||
|
|
||
| [id="full-data-handoff-and-custom-workflow-design"] | ||
|
|
||
| = Data handoff and custom workflow design | ||
|
|
||
| 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. | ||
|
|
||
| As an administrator, you can define the Scaffolder template workflow and structure the workflow to do the following: | ||
|
|
||
| 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. | ||
|
|
||
| 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. | ||
57 changes: 57 additions & 0 deletions
57
...repositories/procedure-integrating-bulk-import-with-orchestrator-workflows.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,57 @@ | ||
| :_mod-docs-content-type: PROCEDURE | ||
|
|
||
| [id="integrating-bulk-import-with-orchestrator-workflows"] | ||
| = Setting up a custom Scaffolder workflow for Bulk Import | ||
|
|
||
| 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. | ||
|
|
||
| You can define various custom tasks, including, but not limited to the following: | ||
|
|
||
| * Importing existing catalog entities from a repository | ||
| * Creating pull requests for cleanup | ||
| * Calling webhooks for external system integration | ||
|
|
||
| .Prerequisites | ||
|
|
||
| * You created a custom Scaffolder template for the Bulk Import plugin. | ||
|
|
||
| * You have run your {product-very-short} instance with the following environment variable enabled to allow the use of the Scaffolder functionality: | ||
| + | ||
| [source,yaml] | ||
| ---- | ||
| export NODE_OPTIONS=--no-node-snapshot | ||
| ---- | ||
|
|
||
| .Procedure | ||
|
|
||
| * Configure your {my-app-config-file} configuration to instruct the Bulk Import plugin to use your custom template as shown in the following example: | ||
| + | ||
| [source,yaml] | ||
| ---- | ||
| bulkImport: | ||
| importTemplate: <your_template_entity_reference_or_template_name> | ||
| importAPI: `open-pull-requests` | `scaffolder`; | ||
| ---- | ||
| + | ||
| where: | ||
|
|
||
| `importTemplate:`:: | ||
| Enter your Scaffolder template entity reference. | ||
|
|
||
| `importAPI`:: | ||
| Set the API to 'scaffolder' to trigger the defined workflow for high-fidelity automation. This field defines the import workflow and currently supports two following options: | ||
jmagak marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| `open-pull-requests`:: This is the default import workflow, which includes the logic for creating pull requests for every selected repository. | ||
|
|
||
| `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. | ||
| + | ||
| Optional: You can direct the Bulk Import plugin to hand off the entire list of selected repositories to a custom Orchestrator workflow. | ||
jmagak marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| + | ||
| [IMPORTANT] | ||
| ==== | ||
| 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. | ||
| ==== | ||
|
|
||
| .Verification | ||
|
|
||
| * The Bulk Import plugin runs the custom Scaffolder template for the list of repositories using the `/task-imports` API endpoint. | ||
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.