8.5. Bulk Import Scaffolder 模板的输入参数


作为管理员,您可以使用 Bulk Import 插件使用指定参数运行 Scaffolder 模板任务,您必须在模板中定义。

Bulk Import 插件分析 Git 存储库信息,并为 Scaffolder 模板任务提供以下参数:

repoUrl

以以下格式规范化存储库 URL:

  ${gitProviderHost}?owner=${owner}&repo=${repository-name}
Copy to Clipboard Toggle word wrap
name
存储库名称。
机构
存储库所有者,可以是用户 nickname 或 organization 名称。
branchName
建议的存储库分支。默认情况下,提议的存储库分支是 bulk-import-catalog-entity
targetBranchName
Git 存储库的默认分支。
gitProviderHost
从存储库 URL 解析的 Git 提供程序主机。您可以使用此参数编写 Git-provider-agnostic 模板。

Scaffolder 模板示例:

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
Copy to Clipboard Toggle word wrap
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat