Skip to content

Commit 5bf84b1

Browse files
authored
ci: use blobless clones in publishing pipelines (#2315)
On CI, checkouts start by creating a new Git repo, then adding a remote and performing a checkout to a specific commit. This means that we're usually left in a headless state. Switching to a blobless clone should allow us to access full Git history without the cost of a full clone.
1 parent 7e79c7f commit 5bf84b1

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

.ado/jobs/npm-publish-dry-run.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ jobs:
88
steps:
99
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
1010
clean: true # whether to fetch clean each time
11-
# fetchDepth: 2 # the depth of commits to ask Git to fetch
12-
lfs: false # whether to download Git-LFS files
13-
submodules: recursive # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules
11+
fetchFilter: blob:none # partial clone for faster clones while maintaining history
1412
persistCredentials: true # set to 'true' to leave the OAuth token in the Git config after the initial fetch
1513

1614
- template: /.ado/templates/npm-publish.yml@self

.ado/publish.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,7 @@ extends:
6868
steps:
6969
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
7070
clean: true # whether to fetch clean each time
71-
# fetchDepth: 2 # the depth of commits to ask Git to fetch
72-
lfs: false # whether to download Git-LFS files
73-
submodules: recursive # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules
71+
fetchFilter: blob:none # partial clone for faster clones while maintaining history
7472
persistCredentials: true # set to 'true' to leave the OAuth token in the Git config after the initial fetch
7573

7674
- template: /.ado/templates/npm-publish.yml@self

0 commit comments

Comments
 (0)