@@ -331,9 +331,17 @@ extends:
331331
332332 - template : /tools/pipelines/templates/include-install.yml@self
333333 parameters :
334- packageManager : ' ${{ parameters.packageManager }}'
335334 buildDirectory : ' ${{ parameters.buildDirectory }}'
335+ installPnpm : ${{ eq(parameters.packageManager, 'pnpm') }}
336336 packageManagerInstallCommand : ' ${{ parameters.packageManagerInstallCommand }}'
337+ # The compat-workspaces lockfile is committed to the FluidFramework repo and changes
338+ # whenever legacy package versions are added or removed. Including it in the pnpm store
339+ # cache key ensures a cache miss whenever the set of compat packages changes.
340+ ${{ if and(eq(parameters.isBundleSizeArtifactsPipeline, false), eq(parameters.buildToolsVersionToInstall, 'repo')) }} :
341+ # Currently repo build-tools also installs sharing the store - ideally that is removed by #73628 and the `| ...` can be removed.
342+ additionalLockFilePaths : ' ${{ parameters.buildDirectory }}/packages/test/test-version-utils/compat-workspaces/full/pnpm-lock.yaml | ${{ parameters.buildDirectory }}/build-tools/pnpm-lock.yaml'
343+ ${{ else }} :
344+ additionalLockFilePaths : ' ${{ parameters.buildDirectory }}/packages/test/test-version-utils/compat-workspaces/full/pnpm-lock.yaml'
337345
338346 # The bundle-size-artifacts pipeline runs a client build but doesn't publish packages,
339347 # so we skip version setting for it.
@@ -343,6 +351,11 @@ extends:
343351 buildDirectory : ' ${{ parameters.buildDirectory }}'
344352 buildNumberInPatch : ${{ parameters.buildNumberInPatch }}
345353 buildToolsVersionToInstall : ' ${{ parameters.buildToolsVersionToInstall }}'
354+ # Note that skipping pnpm install means client pnpm version must suffice for build-tools.
355+ # Ideally, #73628 removes include-install-build-tools template use in include-set-package-version
356+ # making it a non-issue. For now, second pnpm install is skipped to preserve the client version
357+ # for all remaining steps.
358+ installPnpmForRepoBuildTools : ${{ ne(parameters.packageManager, 'pnpm') }}
346359 tagName : ' ${{ parameters.tagName }}'
347360 interdependencyRange : ' ${{ parameters.interdependencyRange }}'
348361 packageTypesOverride : ' ${{ parameters.packageTypesOverride }}'
@@ -600,15 +613,25 @@ extends:
600613
601614 - template : /tools/pipelines/templates/include-install.yml@self
602615 parameters :
603- packageManager : ' ${{ parameters.packageManager }}'
604616 buildDirectory : ' ${{ parameters.buildDirectory }}'
617+ installPnpm : ${{ eq(parameters.packageManager, 'pnpm') }}
605618 packageManagerInstallCommand : ' ${{ parameters.packageManagerInstallCommand }}'
619+ # The compat-workspaces lockfile is committed to the FluidFramework repo and changes
620+ # whenever legacy package versions are added or removed. Including it in the pnpm store
621+ # cache key ensures a cache miss whenever the set of compat packages changes.
622+ # Currently repo build-tools also installs sharing the store - ideally that is removed by #73628 and the `| ...` can be removed.
623+ additionalLockFilePaths : ' ${{ parameters.buildDirectory }}/packages/test/test-version-utils/compat-workspaces/full/pnpm-lock.yaml | ${{ parameters.buildDirectory }}/build-tools/pnpm-lock.yaml'
606624
607625 # We need it in order to run flub where the code coverage comparison logic calls for it
608626 - template : /tools/pipelines/templates/include-install-build-tools.yml@self
609627 parameters :
610628 buildDirectory : ${{ parameters.buildDirectory }}
611629 buildToolsVersionToInstall : repo
630+ # Note that skipping pnpm install means client pnpm version must suffice for build-tools.
631+ # Ideally, #73628 removes this whole template use making it a non-issue. For now, second
632+ # pnpm install is skipped to preserve the client version for any remaining steps.
633+ installPnpmForRepoBuildTools : ${{ ne(parameters.packageManager, 'pnpm') }}
634+ # This shares the store with the client installs (above).
612635 pnpmStorePath : $(Pipeline.Workspace)/.pnpm-store
613636
614637 - task : DownloadPipelineArtifact@2
@@ -764,9 +787,13 @@ extends:
764787
765788 - template : /tools/pipelines/templates/include-install.yml@self
766789 parameters :
767- packageManager : ' ${{ parameters.packageManager }}'
768790 buildDirectory : ' ${{ parameters.buildDirectory }}'
791+ installPnpm : ${{ eq(parameters.packageManager, 'pnpm') }}
769792 packageManagerInstallCommand : ' ${{ parameters.packageManagerInstallCommand }}'
793+ # The compat-workspaces lockfile is committed to the FluidFramework repo and changes
794+ # whenever legacy package versions are added or removed. Including it in the pnpm store
795+ # cache key ensures a cache miss whenever the set of compat packages changes.
796+ additionalLockFilePaths : ' ${{ parameters.buildDirectory }}/packages/test/test-version-utils/compat-workspaces/full/pnpm-lock.yaml'
770797
771798 - task : DownloadPipelineArtifact@2
772799 inputs :
0 commit comments