Skip to content

Commit 40b8980

Browse files
authored
Added npm auth step to internal feed (#48720)
* Added npm auth step to internal feed * Added root nuget config to disable non-cfs feed
1 parent 0ad7841 commit 40b8980

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

NuGet.Config

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<packageSources>
4+
<clear />
5+
<!-- Do not add any additional feeds. If new packages are needed they need to
6+
come from the azure-sdk-for-net DevOps feed which has an upstream set to nuget.org -->
7+
<add key="azure-sdk-for-net" value="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json" />
8+
</packageSources>
9+
<disabledPackageSources>
10+
<clear />
11+
</disabledPackageSources>
12+
</configuration>

eng/pipelines/templates/jobs/ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,11 @@ jobs:
429429
version: 22.x
430430
displayName: Use Node.js 22.x
431431

432+
# Authenticate npm to Azure Artifacts
433+
- template: /eng/common/pipelines/templates/steps/create-authenticated-npmrc.yml
434+
parameters:
435+
npmrcPath: $(Agent.TempDirectory)/analyze-job/.npmrc
436+
432437
- task: PowerShell@2
433438
displayName: Verify Swagger and TypeSpec Code Generation
434439
inputs:
@@ -437,6 +442,8 @@ jobs:
437442
arguments: >
438443
-ServiceDirectories '$(PRServiceDirectories)'
439444
-RegenerationType 'All'
445+
env:
446+
NPM_CONFIG_USERCONFIG: $(Agent.TempDirectory)/analyze-job/.npmrc
440447

441448
# Authenticate with Azure Artifacts
442449
- template: /eng/pipelines/templates/steps/maven-authenticate.yml

0 commit comments

Comments
 (0)