Skip to main content

格瑞特位置

Gerrit 集成支持从 Gerrit 托管的 gits 中加载目录实体。 实体可以添加到静态目录配置或在目录-导入插件。

配置

要使用此集成,请在根目录中添加至少一个 Gerrit 配置app-config.yaml:

integrations:
gerrit:
- host: gerrit.company.com
baseUrl: https://gerrit.company.com/gerrit
cloneUrl: https://gerrit.company.com/clone
gitilesBaseUrl: https://gerrit.company.com/gitiles
username: ${GERRIT_USERNAME}
password: ${GERRIT_PASSWORD}

正下方gerrit键是一个提供者配置列表,你可以在其中列出想要从中获取数据的 Gerrit 实例。 每个条目都是一个最多包含六个元素的结构:

  • host: The host of the Gerrit instance, e.g. gerrit.company.com. * baseUrl (optional): Needed if the Gerrit instance is not reachable at the base of the host option (e.g. https://gerrit.company.com) set the address here. This is the address that you would open in a browser. * cloneUrl (optional): The base URL for HTTP clones. Will default to baseUrl if not set. The address used to clone a repo is the cloneUrl plus the repo name. * gitilesBaseUrl (optional): This is needed for creating a valid user-friendly URL that can be used for browsing the content of the provider. If not set a default value will be created in the same way as the baseUrl option. There is no requirement to have Gitiles for the Backstage Gerrit integration but without it some links in the Backstage UI will be broken. * username (optional): The Gerrit username to use in API requests. If neither a username nor password are supplied, anonymous access will be used. * password (optional): The password or http token for th