Skip to content

Commit

Permalink
Added fetchdepth to disable default shallow checkout in new pipelines (
Browse files Browse the repository at this point in the history
…#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.
  • Loading branch information
apop5 authored Jul 14, 2023
1 parent f5f587e commit 15d494e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions Jobs/CreateBuildMatrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:

steps:
- checkout: none
fetchDepth: 0

- task: PowerShell@2
name: CalculateMatrix
Expand Down
1 change: 1 addition & 0 deletions Steps/BuildPlatform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ steps:
- ${{ if eq(parameters.checkout_self, true) }}:
- checkout: self
clean: true
fetchDepth: 0
# Note: Depth cannot be limited if PR Eval is used. A pipeline may choose
# to use a shallow checkout if PR eval is not used.

Expand Down
1 change: 1 addition & 0 deletions Steps/PrGate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ steps:
- ${{ if eq(parameters.checkout_self, true) }}:
- checkout: self
clean: true
fetchDepth: 0
# Note: Depth cannot be limited if PR Eval is used

- template: SetupPythonPreReqs.yml
Expand Down
1 change: 1 addition & 0 deletions Steps/RunPatchCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ pool:
steps:
- checkout: self
clean: true
fetchDepth: 0

- template: Steps/SetupPythonPreReqs.yml
- script: |
Expand Down

0 comments on commit 15d494e

Please sign in to comment.