我找不到与此相关的任何参考。
是否支持调用其REST API来添加子模块?
答案 0 :(得分:0)
我找不到与REST API相关的子模块。
如果要从子模块下载文件,我们可以在管道的Checkout步骤中配置子模块设置。 示例代码:
steps:
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
clean: boolean # whether to fetch clean each time
fetchDepth: number # the depth of commits to ask Git to fetch
lfs: boolean # whether to download Git-LFS files
submodules: true | recursive # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules
path: string # path to check out source code, relative to the agent's build directory (e.g. \_work\1)
persistCredentials: boolean # set to 'true' to leave the OAuth token in the Git config after the initial fetch
或者我们可以使用git command git submodule add {url}
检出子模块
更新1
我们可以安装PowerShell模块posh-git,然后在电源外壳中使用git cmd。您可以参考文档posh-git和Setting up Git in PowerShell