Continuous integration 存储库的浅层获取
我有一个Azure管道(yaml),它使用模板,我正试图找出如何设置被克隆的实际存储库的获取深度Continuous integration 存储库的浅层获取,continuous-integration,azure-devops,azure-pipelines,Continuous Integration,Azure Devops,Azure Pipelines,我有一个Azure管道(yaml),它使用模板,我正试图找出如何设置被克隆的实际存储库的获取深度 resources: repositories: - repository: templates type: git name: 'DevOps/CICD' ref: refs/heads/develop - repository: self # sic! fetchDepth: 1 clean: true` 支持获取
resources:
repositories:
- repository: templates
type: git
name: 'DevOps/CICD'
ref: refs/heads/develop
- repository: self # sic!
fetchDepth: 1
clean: true`
支持获取深度(vscode扩展名),但我似乎找不到任何扩展名。以下是您要查找的链接:
属性确实是fetchDepth。将其放在
步骤下对我很有用:
steps:
- checkout: self
fetchDepth: 1
clean: true
- task: NuGetCommand@2
...
结果:
2019-01-17T09:21:45.1133753Z##[命令]git-c http.extraheader=“AUTHORIZATION:bearer***”fetch--tags--prune--progress--no recurse子模块--depth=1原点
谢谢你知道应该在哪里设置吗?(在yaml层次结构中)非常确定这是层次结构的根,因此在第一级NVM,在步骤下找到了它,不确定为什么它会在步骤下,也许如果您需要在阶段中直接签出某些内容,它不必是存储库,它可以是repo(在许多构建中对我都适用)