Skip to content

Commit

Permalink
Add private NPM registry only during ADO build
Browse files Browse the repository at this point in the history
As it was breaking Dependabot and local builds.
  • Loading branch information
andyleejordan committed Feb 13, 2024
1 parent 45dd36a commit 946c8a4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
3 changes: 0 additions & 3 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
; We use Dependabot to update our packages, so we want to add without a prefix
save-exact=true
; We download from a private feed during the release process
registry=https://pkgs.dev.azure.com/powershell-rel/PowerShellEditorServices/_packaging/PSESFeed/npm/registry/
always-auth=true
9 changes: 9 additions & 0 deletions .vsts-ci/templates/ci-general.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ steps:
inputs:
version: 18.x

- task: PowerShell@2
displayName: Add private NPM registry
inputs:
targetType: inline
pwsh: true
script: |
Add-Content .npmrc "always-auth=true"
Add-Content .npmrc "registry=https://pkgs.dev.azure.com/powershell-rel/PowerShellEditorServices/_packaging/PSESFeed/npm/registry/"
- task: npmAuthenticate@0
inputs:
workingFile: $(Build.SourcesDirectory)/vscode-powershell/.npmrc
Expand Down
9 changes: 9 additions & 0 deletions .vsts-ci/templates/publish-markets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ steps:
artifact: vscode-powershell
displayName: Download signed artifacts

- task: PowerShell@2
displayName: Add private NPM registry
inputs:
targetType: inline
pwsh: true
script: |
Add-Content .npmrc "always-auth=true"
Add-Content .npmrc "registry=https://pkgs.dev.azure.com/powershell-rel/PowerShellEditorServices/_packaging/PSESFeed/npm/registry/"
- task: npmAuthenticate@0
inputs:
workingFile: .npmrc
Expand Down

0 comments on commit 946c8a4

Please sign in to comment.