Skip to content

Commit

Permalink
ci: use blobless clones in publishing pipelines (#2315)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tido64 authored Dec 6, 2024
1 parent 7e79c7f commit 5bf84b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions .ado/jobs/npm-publish-dry-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ jobs:
steps:
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
clean: true # whether to fetch clean each time
# fetchDepth: 2 # the depth of commits to ask Git to fetch
lfs: false # whether to download Git-LFS files
submodules: recursive # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules
fetchFilter: blob:none # partial clone for faster clones while maintaining history
persistCredentials: true # set to 'true' to leave the OAuth token in the Git config after the initial fetch

- template: /.ado/templates/npm-publish.yml@self
4 changes: 1 addition & 3 deletions .ado/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,7 @@ extends:
steps:
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
clean: true # whether to fetch clean each time
# fetchDepth: 2 # the depth of commits to ask Git to fetch
lfs: false # whether to download Git-LFS files
submodules: recursive # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules
fetchFilter: blob:none # partial clone for faster clones while maintaining history
persistCredentials: true # set to 'true' to leave the OAuth token in the Git config after the initial fetch

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

0 comments on commit 5bf84b1

Please sign in to comment.