Skip to content

Commit 15d494e

Browse files
authored
Added fetchdepth to disable default shallow checkout in new pipelines (#220)
https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/steps-checkout?view=azure-pipelines#shallow-fetch `New pipelines created after the [September 2022 Azure DevOps sprint 209 update](https://learn.microsoft.com/en-us/azure/devops/release-notes/2022/sprint-209-update) have Shallow fetch enabled by default and configured with a depth of 1. Previously the default was not to shallow fetch. To check your pipeline, view the Shallow fetch setting in the [pipeline settings UI](https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/azure-repos-git#shallow-fetch).` Adding fetchdepth of 0 to disable default of shallow checkout for new pipelines using mu_devops.
1 parent f5f587e commit 15d494e

4 files changed

Lines changed: 4 additions & 0 deletions

File tree

Jobs/CreateBuildMatrix.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636

3737
steps:
3838
- checkout: none
39+
fetchDepth: 0
3940

4041
- task: PowerShell@2
4142
name: CalculateMatrix

Steps/BuildPlatform.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ steps:
7171
- ${{ if eq(parameters.checkout_self, true) }}:
7272
- checkout: self
7373
clean: true
74+
fetchDepth: 0
7475
# Note: Depth cannot be limited if PR Eval is used. A pipeline may choose
7576
# to use a shallow checkout if PR eval is not used.
7677

Steps/PrGate.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ steps:
8383
- ${{ if eq(parameters.checkout_self, true) }}:
8484
- checkout: self
8585
clean: true
86+
fetchDepth: 0
8687
# Note: Depth cannot be limited if PR Eval is used
8788

8889
- template: SetupPythonPreReqs.yml

Steps/RunPatchCheck.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ pool:
2424
steps:
2525
- checkout: self
2626
clean: true
27+
fetchDepth: 0
2728

2829
- template: Steps/SetupPythonPreReqs.yml
2930
- script: |

0 commit comments

Comments
 (0)