浅获取存储库

时间:2019-01-17 08:13:25

标签: 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`

支持提取深度(vscode扩展名),但我似乎找不到任何广泛的documentation。.

2 个答案:

答案 0 :(得分:1)

答案 1 :(得分:1)

将其放在steps下对我有用:

steps:
  - checkout: self
    fetchDepth: 1
    clean: true
  - task: NuGetCommand@2
  ...

结果:

  

2019-01-17T09:21:45.1133753Z ## [command] git -c http.extraheader =“ AUTHORIZATION:bearer ***”获取--tags --prune --progress --no-recurse-submodules --depth = 1起源

相关问题