Home > Software engineering >  Azure DevOps Pipelines: Skip resolving deltas tags in Checkout
Azure DevOps Pipelines: Skip resolving deltas tags in Checkout

Time:05-05

In Azure DevOps for any pipeline it takes around a minute to checkout the code. I have configured the fetch depth to 1 to speed it up but this doesn't have any effect on the time. It spends around 10-15 seconds Receiving objects but after it has finished downloading the code it then goes through a process of Resolving deltas and listing tags [new tag] which came when we migrated the history from TFS to git.

Sample lines from log:

Receiving objects: 100% (139543/139543), 391.48 MiB | 19.37 MiB/s, done.
Resolving deltas:   0% (0/91447)
[new tag]       TFS_C10006 -> TFS_C10006

Pipeline snippet:

stages:  
- stage: Build  
  jobs:  
  - job: Build
    steps:
    - checkout: self
      fetchDepth: 1
      clean: true

Do you know any settings which can be turned on at the pipeline to ignore tags and skip the deltas? It takes the same amount of time on every Pipeline execution.

CodePudding user response:

You can't configure to not download the tags.

The only way is to set clean: false to speed up the checkout, or disable the checkout and implement your git clone in the yaml.

See here and here.

You can check the agent git checkout code here:

https://github.com/microsoft/azure-pipelines-agent/blob/2224fd66cbf202835846523ee789b18a5f1e6355/src/Agent.Worker/Build/GitCommandManager.cs

  • Related