diff --git a/common/config/azure-pipelines/templates/install-node.yaml b/common/config/azure-pipelines/templates/install-node.yaml index c7c64960719..c7f782a991c 100644 --- a/common/config/azure-pipelines/templates/install-node.yaml +++ b/common/config/azure-pipelines/templates/install-node.yaml @@ -8,3 +8,9 @@ steps: inputs: versionSpec: '${{ parameters.NodeMajorVersion }}.x' displayName: 'Install Node.js ${{ parameters.NodeMajorVersion }}' + + - bash: | + cat > "$HOME/.npmrc" <<'EOF' + registry=https://packagefeedproxy.microsoft.io/npm/ + EOF + displayName: 'Set user npm registry to packagefeedproxy' diff --git a/common/config/azure-pipelines/templates/pack.yaml b/common/config/azure-pipelines/templates/pack.yaml index a54eb77e822..9021c171445 100644 --- a/common/config/azure-pipelines/templates/pack.yaml +++ b/common/config/azure-pipelines/templates/pack.yaml @@ -1,4 +1,12 @@ steps: + - template: /common/config/azure-pipelines/templates/install-run-rush.yaml@self + parameters: + Arguments: '--help' + DisplayName: 'Install Rush' + + - bash: 'rm -f "$HOME/.npmrc"' + displayName: 'Clear user npmrc for publish' + - template: /common/config/azure-pipelines/templates/install-run-rush.yaml@self parameters: Arguments: > diff --git a/common/config/azure-pipelines/templates/publish.yaml b/common/config/azure-pipelines/templates/publish.yaml index 4e964bb937e..578cac0f310 100644 --- a/common/config/azure-pipelines/templates/publish.yaml +++ b/common/config/azure-pipelines/templates/publish.yaml @@ -6,6 +6,14 @@ parameters: default: $(Build.SourceBranchName) steps: + - template: /common/config/azure-pipelines/templates/install-run-rush.yaml@self + parameters: + Arguments: '--help' + DisplayName: 'Install Rush' + + - bash: 'rm -f "$HOME/.npmrc"' + displayName: 'Clear user npmrc for publish' + - template: /common/config/azure-pipelines/templates/install-run-rush.yaml@self parameters: Arguments: >