更新时间:2024-04-03 GMT+08:00
使用yaml配置manifest多仓下载
在安卓、鸿蒙等场景下,一次构建需要同时集成数百甚至上千个代码仓,多代码仓的集成下载效率至关重要。
CodeArts Build集成Repo下载工具,用户只需进行简单配置即可实现多个代码仓的联动集成。当前支持Repo、gerrit两种类型的代码仓。
配置参考如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
version: 2.0 # 必须是2.0 steps: PRE_BUILD: - manifest_checkout: name: "manifest" inputs: manifest_url: "https://example.example.example.example.example.com/xx/manifest.git" manifest_branch: "master" manifest_file: "default.xml" path: "dir/dir02" repo_url: "https://example.example.example.example.example.com/xx/git-repo.git" repo_branch: "master" username: "someone" password: "${PASSWD}" |
参数说明如下:
参数名 |
参数类型 |
描述 |
是否必填 |
默认值 |
---|---|---|---|---|
name |
string |
步骤名称。 |
否 |
manifest_checkout |
manifest_url |
string |
指定manifest仓地址,包含xml文件的仓库。 |
是 |
无 |
manifest_branch |
string |
指定manifest分支或revision。 |
否 |
HEAD |
manifest_file |
string |
manifest文件路径。 |
否 |
default.xml |
path |
string |
自定义manifest所有子仓下载路径,为工作目录的相对路径 路径不能以“/”开头,不能包含“.”。 |
否 |
默认为工作目录。 |
repo_url |
string |
repo仓库地址。 |
否 |
|
repo_branch |
string |
repo仓库分支。 |
否 |
stable |
username |
string |
下载仓库时使用的用户名。 |
否。 下载非公开仓库时需填写。 |
无 |
password |
string |
下载仓库时使用的密码,https密码。 |
否。 下载非公开仓库时需填写。 |
无 |
![](https://support.huaweicloud.com/intl/zh-cn/usermanual-codeci/public_sys-resources/note_3.0-zh-cn.png)
- manifest_file中定义的多个仓库,必须为同一种源码源。
- manifest_url与manifest_file必须为同一种源码源;如果为非公开仓库,username&password应该有下载权限。
- repo_url对应的repo仓库,需要有下载权限(仓库开源,或者仓库私有但配置了账号密码)。
- 以上非必填的参数,如果配置的值为空,则使用默认值。
- 建议在使用非公开仓库时,用户名密码通过构建的私密参数进行配置,详情参考参数配置。
父主题: 单任务配置