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: 0in your
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.
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.
- Navigate to your pipeline and click Edit
- Click the ... button and choose Triggers
- Switch to YAML tab and click on Get sources
- Here it is, at the very bottom