Skip to content

Commit 4412885

Browse files
GitHub Actionsjmagak
authored andcommitted
Add a new module
1 parent 154005b commit 4412885

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ include::modules/importing-repositories/procedure-managing-the-imported-reposito
1515

1616
include::modules/importing-repositories/procedure-understanding-bulk-import-audit-logs.adoc[leveloffset=+1]
1717

18+
include::modules/importing-repositories/procedure-bulk-import-scaffolder-template.adoc[leveloffset=+1]
19+
1820
include::modules/importing-repositories/procedure-integrating-bulk-import-with-orchestrator-workflows.adoc[leveloffset=+1]
1921

2022
include::modules/importing-repositories/procedure-data-handoff-and-custom-workflow-design.adoc[leveloffset=+1]
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
:_mod-docs-content-type: PROCEDURE
2+
3+
[id="procedure-bulk-import-scaffolder-template"]
4+
= Understanding Bulk Import Scaffolder template input parameters
5+
6+
You can use the Bulk Import plugin to run a Scaffolder template task with specified parameters. As an administrator, you must use these parameters within the template.
7+
8+
The Bulk Import plugin analyzes Git repository information and provides the following parameters for the Scaffolder template task:
9+
10+
`repoUrl`:: Normalized repository URL in the following format:
11+
+
12+
[source,yaml]
13+
----
14+
${gitProviderHost}?owner=${owner}&repo=${repository-name}
15+
----
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`.
18+
19+
`name`:: The repository name.
20+
+
21+
For example, for `https://github.com/redhat-developer/rhdh-plugins`, the `name` is `rhdh-plugins`.
22+
23+
`organization`:: The repository owner, which can be a user nickname or organization name.
24+
+
25+
For example, for `https://github.com/redhat-developer/rhdh-plugins`, the `organization` is `redhat-developer`.
26+
27+
`branchName`:: The proposed repository branch. By default, the proposed repository branch is `bulk-import-catalog-entity`.
28+
29+
`targetBranchName`:: The default branch of the Git repository.
30+
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.
34+
35+
To use parameters in a Scaffolder template:
36+
[source,yaml]
37+
----
38+
parameters:
39+
- title: Repository Details
40+
required:
41+
- repoUrl
42+
- branchName
43+
- targetBranchName
44+
- name
45+
- organization
46+
properties:
47+
repoUrl:
48+
type: string
49+
title: Repository URL (Backstage format)
50+
description: `github.com?owner=Org&repo=repoName` | `gitlab.com?owner=Org&repo=repoName`
51+
organization:
52+
type: string
53+
title: Owner of the Repository
54+
name:
55+
type: string
56+
title: Name of the repository
57+
branchName:
58+
type: string
59+
title: Branch to add the catalog entity to
60+
targetBranchName:
61+
type: string
62+
title: Branch to target the PR/MR to
63+
gitProviderHost:
64+
type: string
65+
title: Git provider host
66+
----

0 commit comments

Comments
 (0)