8.5. Bulk Import Scaffolder 模板的输入参数
作为管理员,您可以使用 Bulk Import 插件使用指定参数运行 Scaffolder 模板任务,您必须在模板中定义。
Bulk Import 插件分析 Git 存储库信息,并为 Scaffolder 模板任务提供以下参数:
repoUrl以以下格式规范化存储库 URL:
${gitProviderHost}?owner=${owner}&repo=${repository-name}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