diff --git a/tools/pipelines/templates/include-install-pnpm.yml b/tools/pipelines/templates/include-install-pnpm.yml index 58b1317191b3..0650a87808e3 100644 --- a/tools/pipelines/templates/include-install-pnpm.yml +++ b/tools/pipelines/templates/include-install-pnpm.yml @@ -27,6 +27,10 @@ parameters: type: string default: $(Agent.TempDirectory)/.npmrc +- name: primaryRegistry + type: string + default: $(ado-feeds-primary-registry) + steps: - ${{ if eq(parameters.enableCache, true) }}: - task: Cache@2 @@ -69,13 +73,13 @@ steps: echo "##vso[task.setvariable variable=registryType]private" fi env: - NPM_REGISTRY: $(ado-feeds-primary-registry) + NPM_REGISTRY: ${{ parameters.primaryRegistry }} NPM_CONFIG_USERCONFIG: ${{ parameters.userNpmrcPath}} # We should leverage the primary npm registry to install pnpm as well. However, ADO artifacts feeds do not implement # the full npm registry API including a route that corepack uses to get package metadata--the version route here: # https://github.com/nodejs/corepack/blob/bc13d40037d0b1bfd386e260ae741f55505b5c7c/sources/npmRegistryUtils.ts#L32 # Thus installing pnpm from an ADO feed using corepack is not possible at time of writing. - # COREPACK_NPM_REGISTRY: $(ado-feeds-primary-registry) + # COREPACK_NPM_REGISTRY: ${{ parameters.primaryRegistry }} # Authenticate to npm feed if required - task: npmAuthenticate@0 diff --git a/tools/pipelines/templates/include-upload-stage-telemetry.yml b/tools/pipelines/templates/include-upload-stage-telemetry.yml index d9f6cef1a4d4..c48a70d02d0c 100644 --- a/tools/pipelines/templates/include-upload-stage-telemetry.yml +++ b/tools/pipelines/templates/include-upload-stage-telemetry.yml @@ -49,6 +49,7 @@ stages: - template: /tools/pipelines/templates/include-install-pnpm.yml@self parameters: buildDirectory: $(Build.SourcesDirectory) + primaryRegistry: $(ado-feeds-ff-download-only) - task: Bash@3 displayName: 'Install dependencies'