A Single Missing YAML Line Can Make a CI Pipeline Deploy Nothing Silently
A subtle misconfiguration in Azure DevOps pipelines can cause a CI build to pass while deploying nothing, with no immediate error or alert. When shallow fetch is enabled, the git diff command finds no parent commit history and returns an empty result, causing all deployment stages to skip silently. The root cause is a missing 'fetchDepth: 0' setting on the checkout step, which is required for change-detection logic to work correctly. The recommended fix is to both set full history fetch and add an explicit script check that raises an error if a shallow clone is detected. A pipeline test that parses the YAML and asserts the fetchDepth value is present can prevent the misconfiguration from being accidentally removed in future changes.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in