Do not set fetch depth on source-build (#90703)
authorMatt Mitchell <mmitche@microsoft.com>
Wed, 16 Aug 2023 22:38:38 +0000 (15:38 -0700)
committerGitHub <noreply@github.com>
Wed, 16 Aug 2023 22:38:38 +0000 (15:38 -0700)
eng/pipelines/common/global-build-job.yml

index 7e24fd3..b870ba3 100644 (file)
@@ -147,7 +147,10 @@ jobs:
     steps:
     - checkout: self
       clean: true
-      fetchDepth: $(checkoutFetchDepth)
+      # If running in source build mode, a git stash will be used for the inner clone. Avoid setting a fetch depth,
+      # as a stash of a shallow cloned repo is not currently supported.
+      ${{ if ne(parameters.isSourceBuild, true) }}:
+        fetchDepth: $(checkoutFetchDepth)
 
     - ${{ if and(eq(parameters.isOfficialBuild, true), notin(parameters.osGroup, 'osx', 'maccatalyst', 'ios', 'iossimulator', 'tvos', 'tvossimulator')) }}:
       - template: /eng/pipelines/common/restore-internal-tools.yml