From 472db6060f6a0fc804cdcab2dbd669204dd58a73 Mon Sep 17 00:00:00 2001 From: Tommy Nguyen <4123478+tido64@users.noreply.github.com> Date: Fri, 6 Dec 2024 10:03:45 +0100 Subject: [PATCH] ci: use blobless clones in publishing pipelines 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. --- .ado/jobs/npm-publish-dry-run.yml | 4 +--- .ado/publish.yml | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.ado/jobs/npm-publish-dry-run.yml b/.ado/jobs/npm-publish-dry-run.yml index 4724813d7d5678..7c86654ae5a5bd 100644 --- a/.ado/jobs/npm-publish-dry-run.yml +++ b/.ado/jobs/npm-publish-dry-run.yml @@ -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 diff --git a/.ado/publish.yml b/.ado/publish.yml index 512c33833ada28..25937ba414b39c 100644 --- a/.ado/publish.yml +++ b/.ado/publish.yml @@ -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