Azure DevOps pipelines shallow fetch =1 is now default

Kinga - Sep 29 '22 - - Dev Community

Pipeline doesn’t work? The old one, exactly the same, is working?
You came to the right place :)

UPDATE 2023.01.27: You may also set fetchDepth: 0 in your checkout step.

The team responsible for the documentation has been very fast, and they updated steps.checkout definition and Build Azure Repos Git or TFS Git repositories within two days from reporting this issue. If you come across any documentation articles that need this info, try reporting it =)

This may come as a surprise, and I imagine it will "break" many newly created pipelines.
All of a sudden things that used to work, won't.

Newly created Azure DevOps pipelines have shallow fetch enabled by default, and the depth is set to 1.

Image description

It's not documented, not even in what's new (although I asked for it to be mentioned so maybe by the time you are reading this, it's there).

You have two options now, if you want to change it.
Either fetchDepth in checkout step, or disable shallow fetch on the pipeline level.

Disable shallow fetch

  1. Navigate to your pipeline and click Edit Image description
  2. Click the ... button and choose Triggers Image description
  3. Switch to YAML tab and click on Get sources Image description
  4. Here it is, at the very bottom Image description
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player