Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions tools/pipelines/templates/include-install-pnpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Loading